mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 04:31:13 +01:00
Compare commits
No commits in common. "9121c16ab3d80a17f9cebf220408766a294ffcd2" and "faed4037d4a7821a3ca389ad461c7b936cf71915" have entirely different histories.
9121c16ab3
...
faed4037d4
@ -119,11 +119,10 @@ nginx_homepage_root: "/usr/share/nginx/homepage/"
|
||||
|
||||
### Service Domains
|
||||
domain_akaunting: "accounting.{{top_domain}}"
|
||||
domain_attendize: "tickets.{{top_domain}}"
|
||||
domain_baserow: "baserow.{{top_domain}}"
|
||||
domain_bigbluebutton: "meet.{{top_domain}}"
|
||||
domain_discourse: "forum.{{top_domain}}"
|
||||
domain_elk: "elk.{{top_domain}}"
|
||||
domain_discourse: "forum.{{top_domain}}"
|
||||
domain_funkwhale: "music.{{top_domain}}"
|
||||
domain_gitea: "git.{{top_domain}}"
|
||||
domain_gitlab: "gitlab.{{top_domain}}"
|
||||
@ -137,13 +136,13 @@ domain_matrix_element: "element.{{top_domain}}"
|
||||
domain_moodle: "academy.{{top_domain}}"
|
||||
domain_mediawiki: "wiki.{{top_domain}}"
|
||||
domain_nextcloud: "cloud.{{top_domain}}"
|
||||
domain_openproject: "project.{{top_domain}}"
|
||||
domain_pixelfed: "picture.{{top_domain}}"
|
||||
domain_peertube: "video.{{top_domain}}"
|
||||
domains_peertube: []
|
||||
domain_roulette: "roulette.{{top_domain}}"
|
||||
domain_taiga: "kanban.{{top_domain}}"
|
||||
domain_attendize: "tickets.{{top_domain}}"
|
||||
domain_yourls: "s.{{top_domain}}"
|
||||
domain_openproject: "project.{{top_domain}}"
|
||||
domains_wordpress: ["wordpress.{{top_domain}}","blog.{{top_domain}}"]
|
||||
|
||||
### Domain Redirects
|
||||
@ -161,7 +160,6 @@ redirect_domain_mappings:
|
||||
- { source: "pictures.{{top_domain}}", target: "{{domain_pixelfed}}" }
|
||||
- { source: "pixelfed.{{top_domain}}", target: "{{domain_pixelfed}}" }
|
||||
- { source: "short.{{top_domain}}", target: "{{domain_yourls}}" }
|
||||
- { source: "taiga.{{top_domain}}", target: "{{domain_taiga}}" }
|
||||
- { source: "videos.{{top_domain}}", target: "{{domain_peertube}}" }
|
||||
|
||||
## Docker Applications
|
||||
|
@ -257,15 +257,6 @@
|
||||
domain: "{{domain_moodle}}"
|
||||
http_port: 8026
|
||||
|
||||
- name: setup taiga instance
|
||||
hosts: taiga
|
||||
become: true
|
||||
roles:
|
||||
- role: docker-taiga
|
||||
vars:
|
||||
domain: "{{domain_taiga}}"
|
||||
http_port: 8027
|
||||
|
||||
# Native Webserver Roles
|
||||
- name: setup nginx-homepages
|
||||
hosts: homepage
|
||||
|
@ -1,4 +1,6 @@
|
||||
docker_compose_project_name: "akaunting"
|
||||
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose.yml.backup"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{akaunting_database_password}}"
|
||||
repository_address: "https://github.com/akaunting/docker.git"
|
||||
|
@ -1,5 +1,7 @@
|
||||
---
|
||||
docker_compose_project_name: "attendize"
|
||||
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose.yml.backup"
|
||||
mail_interface_domain: "mail.{{domain}}"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{attendize_database_password}}"
|
||||
|
@ -1,6 +1,8 @@
|
||||
docker_compose_project_name: "openproject"
|
||||
repository_directory: "{{ path_docker_compose_instances }}{{docker_compose_project_name}}/"
|
||||
docker_compose_instance_directory: "{{repository_directory}}compose/"
|
||||
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose.yml.backup"
|
||||
database_password: "{{openproject_database_password}}"
|
||||
repository_address: "https://github.com/opf/openproject-deploy"
|
||||
database_type: "postgres"
|
||||
|
@ -23,12 +23,6 @@ This Ansible role is designed to deploy a PostgreSQL database using Docker. It i
|
||||
2. Include this role in your playbook.
|
||||
3. Run the playbook against the target host.
|
||||
|
||||
## Root Access
|
||||
To access the database via the root account execute the following on the server:
|
||||
```bash
|
||||
docker exec -it central-postgres psql -U postgres
|
||||
```
|
||||
|
||||
## Notes
|
||||
- The PostgreSQL server is bound to `127.0.0.1:5432` on the host machine, making it accessible only from localhost.
|
||||
- Ensure that the provided passwords are secure and stored securely, preferably using Ansible Vault or another encryption method.
|
@ -5,10 +5,9 @@
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
- name: "include tasks update-repository-with-files.yml"
|
||||
include_tasks: update-repository-with-files.yml
|
||||
vars:
|
||||
detached_files:
|
||||
- .env
|
||||
- docker-compose.yml
|
||||
- docker-compose-inits.yml
|
||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
||||
include_tasks: update-repository-with-docker-compose.yml
|
||||
|
||||
- name: configure run.env
|
||||
template: src=env.j2 dest={{docker_compose_instance_directory}}/.env
|
||||
notify: docker compose project setup
|
||||
|
@ -1,9 +1,11 @@
|
||||
version: "3.5"
|
||||
|
||||
x-environment:
|
||||
&default-back-environment
|
||||
POSTGRES_DB: "{{database_name}}"
|
||||
POSTGRES_DB: "taiga"
|
||||
POSTGRES_USER: "${POSTGRES_USER}"
|
||||
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
|
||||
POSTGRES_HOST: "{{database_host}}"
|
||||
POSTGRES_HOST: "taiga-db"
|
||||
|
||||
TAIGA_SECRET_KEY: "${SECRET_KEY}"
|
||||
TAIGA_SITES_SCHEME: "${TAIGA_SCHEME}"
|
||||
@ -24,18 +26,17 @@ x-environment:
|
||||
|
||||
x-volumes:
|
||||
&default-back-volumes
|
||||
- static-data:/taiga-back/static
|
||||
- media-data:/taiga-back/media
|
||||
- taiga-static-data:/taiga-back/static
|
||||
- taiga-media-data:/taiga-back/media
|
||||
# - ./config.py:/taiga-back/settings/config.py
|
||||
|
||||
services:
|
||||
taiga-manage:
|
||||
image: taigaio/taiga-back:latest
|
||||
environment: *default-back-environment
|
||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
|
||||
depends_on:
|
||||
- taiga-db
|
||||
entrypoint: "python manage.py"
|
||||
volumes: *default-back-volumes
|
||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
||||
taiga:
|
||||
networks:
|
||||
- taiga
|
@ -1,12 +1,13 @@
|
||||
version: "3.5"
|
||||
|
||||
x-environment:
|
||||
&default-back-environment
|
||||
# These environment variables will be used by taiga-back and taiga-async.
|
||||
# Database settings
|
||||
POSTGRES_DB: "{{database_name}}"
|
||||
POSTGRES_DB: "taiga"
|
||||
POSTGRES_USER: "${POSTGRES_USER}"
|
||||
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
|
||||
POSTGRES_HOST: "{{database_host}}"
|
||||
|
||||
POSTGRES_HOST: "taiga-db"
|
||||
# Taiga settings
|
||||
TAIGA_SECRET_KEY: "${SECRET_KEY}"
|
||||
TAIGA_SITES_SCHEME: "${TAIGA_SCHEME}"
|
||||
@ -31,22 +32,38 @@ x-environment:
|
||||
x-volumes:
|
||||
&default-back-volumes
|
||||
# These volumens will be used by taiga-back and taiga-async.
|
||||
- static-data:/taiga-back/static
|
||||
- media-data:/taiga-back/media
|
||||
- taiga-static-data:/taiga-back/static
|
||||
- taiga-media-data:/taiga-back/media
|
||||
# - ./config.py:/taiga-back/settings/config.py
|
||||
|
||||
services:
|
||||
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
|
||||
taiga-db:
|
||||
image: postgres:12.3
|
||||
environment:
|
||||
POSTGRES_DB: "taiga"
|
||||
POSTGRES_USER: "${POSTGRES_USER}"
|
||||
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
||||
interval: 2s
|
||||
timeout: 15s
|
||||
retries: 5
|
||||
start_period: 3s
|
||||
volumes:
|
||||
- taiga-db-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- taiga
|
||||
|
||||
taiga-back:
|
||||
image: taigaio/taiga-back:latest
|
||||
environment: *default-back-environment
|
||||
volumes: *default-back-volumes
|
||||
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
taiga:
|
||||
|
||||
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
||||
events-rabbitmq:
|
||||
networks:
|
||||
- taiga
|
||||
depends_on:
|
||||
taiga-db:
|
||||
condition: service_healthy
|
||||
taiga-events-rabbitmq:
|
||||
condition: service_started
|
||||
taiga-async-rabbitmq:
|
||||
condition: service_started
|
||||
@ -56,12 +73,12 @@ services:
|
||||
entrypoint: ["/taiga-back/docker/async_entrypoint.sh"]
|
||||
environment: *default-back-environment
|
||||
volumes: *default-back-volumes
|
||||
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
taiga:
|
||||
|
||||
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
||||
events-rabbitmq:
|
||||
networks:
|
||||
- taiga
|
||||
depends_on:
|
||||
taiga-db:
|
||||
condition: service_healthy
|
||||
taiga-events-rabbitmq:
|
||||
condition: service_started
|
||||
taiga-async-rabbitmq:
|
||||
condition: service_started
|
||||
@ -75,10 +92,9 @@ services:
|
||||
RABBITMQ_DEFAULT_VHOST: "${RABBITMQ_VHOST}"
|
||||
hostname: "taiga-async-rabbitmq"
|
||||
volumes:
|
||||
- async-rabbitmq-data:/var/lib/rabbitmq
|
||||
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
taiga:
|
||||
- taiga-async-rabbitmq-data:/var/lib/rabbitmq
|
||||
networks:
|
||||
- taiga
|
||||
|
||||
taiga-front:
|
||||
image: taigaio/taiga-front:latest
|
||||
@ -87,9 +103,8 @@ services:
|
||||
TAIGA_WEBSOCKETS_URL: "${WEBSOCKETS_SCHEME}://${TAIGA_DOMAIN}"
|
||||
TAIGA_SUBPATH: "${SUBPATH}"
|
||||
# ...your customizations go here
|
||||
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
taiga:
|
||||
networks:
|
||||
- taiga
|
||||
# volumes:
|
||||
# - ./conf.json:/usr/share/nginx/html/conf.json
|
||||
|
||||
@ -99,57 +114,54 @@ services:
|
||||
RABBITMQ_USER: "${RABBITMQ_USER}"
|
||||
RABBITMQ_PASS: "${RABBITMQ_PASS}"
|
||||
TAIGA_SECRET_KEY: "${SECRET_KEY}"
|
||||
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
taiga:
|
||||
networks:
|
||||
- taiga
|
||||
depends_on:
|
||||
events-rabbitmq:
|
||||
taiga-events-rabbitmq:
|
||||
condition: service_started
|
||||
|
||||
events-rabbitmq:
|
||||
taiga-events-rabbitmq:
|
||||
image: rabbitmq:3.8-management-alpine
|
||||
environment:
|
||||
RABBITMQ_ERLANG_COOKIE: "${RABBITMQ_ERLANG_COOKIE}"
|
||||
RABBITMQ_DEFAULT_USER: "${RABBITMQ_USER}"
|
||||
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_PASS}"
|
||||
RABBITMQ_DEFAULT_VHOST: "${RABBITMQ_VHOST}"
|
||||
hostname: "events-rabbitmq"
|
||||
hostname: "taiga-events-rabbitmq"
|
||||
volumes:
|
||||
- events-rabbitmq-data:/var/lib/rabbitmq
|
||||
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
taiga:
|
||||
- taiga-events-rabbitmq-data:/var/lib/rabbitmq
|
||||
networks:
|
||||
- taiga
|
||||
|
||||
taiga-protected:
|
||||
image: taigaio/taiga-protected:latest
|
||||
environment:
|
||||
MAX_AGE: "${ATTACHMENTS_MAX_AGE}"
|
||||
SECRET_KEY: "${SECRET_KEY}"
|
||||
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
taiga:
|
||||
networks:
|
||||
- taiga
|
||||
|
||||
taiga-gateway:
|
||||
image: nginx:1.19-alpine
|
||||
ports:
|
||||
- "{{http_port}}:80"
|
||||
- "9000:80"
|
||||
volumes:
|
||||
- ./taiga-gateway/taiga.conf:/etc/nginx/conf.d/default.conf
|
||||
- static-data:/taiga/static
|
||||
- media-data:/taiga/media
|
||||
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
taiga:
|
||||
- taiga-static-data:/taiga/static
|
||||
- taiga-media-data:/taiga/media
|
||||
networks:
|
||||
- taiga
|
||||
depends_on:
|
||||
- taiga-front
|
||||
- taiga-back
|
||||
- taiga-events
|
||||
|
||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
||||
static-data:
|
||||
media-data:
|
||||
async-rabbitmq-data:
|
||||
events-rabbitmq-data:
|
||||
volumes:
|
||||
taiga-static-data:
|
||||
taiga-media-data:
|
||||
taiga-db-data:
|
||||
taiga-async-rabbitmq-data:
|
||||
taiga-events-rabbitmq-data:
|
||||
|
||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
||||
taiga:
|
||||
networks:
|
||||
taiga:
|
@ -5,22 +5,22 @@ SUBPATH="" # it'll be appended to the TAIGA_DOMAIN (use either "" or a "/subpath
|
||||
WEBSOCKETS_SCHEME=wss # events connection protocol (use either "ws" or "wss")
|
||||
|
||||
# Taiga's Secret Key - Variable to provide cryptographic signing
|
||||
SECRET_KEY="{{taiga_secret_key}}" # Please, change it to an unpredictable value!!
|
||||
SECRET_KEY="{{taigaio_secret_key}}" # Please, change it to an unpredictable value!!
|
||||
|
||||
# Taiga's Database settings - Variables to create the Taiga database and connect to it
|
||||
POSTGRES_USER={{database_username}} # user to connect to PostgreSQL
|
||||
POSTGRES_PASSWORD={{database_password}} # database user's password
|
||||
POSTGRES_USER=taiga # user to connect to PostgreSQL
|
||||
POSTGRES_PASSWORD=taiga # database user's password
|
||||
|
||||
# Taiga's SMTP settings - Variables to send Taiga's emails to the users
|
||||
EMAIL_BACKEND = console # use an SMTP server or display the emails in the console (either "smtp" or "console")
|
||||
EMAIL_HOST = {{system_email_host}} # SMTP server address
|
||||
EMAIL_PORT = {{system_email_smtp_port}} # default SMTP port
|
||||
EMAIL_HOST_USER = {{system_email_username}} # user to connect the SMTP server
|
||||
EMAIL_HOST_PASSWORD = {{system_email_password}} # SMTP user's password
|
||||
EMAIL_DEFAULT_FROM = {{system_email}} # default email address for the automated emails
|
||||
EMAIL_BACKEND=console # use an SMTP server or display the emails in the console (either "smtp" or "console")
|
||||
EMAIL_HOST=smtp.host.example.com # SMTP server address
|
||||
EMAIL_PORT=587 # default SMTP port
|
||||
EMAIL_HOST_USER=user # user to connect the SMTP server
|
||||
EMAIL_HOST_PASSWORD=password # SMTP user's password
|
||||
EMAIL_DEFAULT_FROM=changeme@example.com # default email address for the automated emails
|
||||
# EMAIL_USE_TLS/EMAIL_USE_SSL are mutually exclusive (only set one of those to True)
|
||||
EMAIL_USE_TLS={{ system_email_tls | lower | capitalize }} # use TLS (secure) connection with the SMTP server
|
||||
EMAIL_USE_SSL={{ 'False' if system_email_start_tls else 'True' }} # use implicit TLS (secure) connection with the SMTP server
|
||||
EMAIL_USE_TLS=True # use TLS (secure) connection with the SMTP server
|
||||
EMAIL_USE_SSL=False # use implicit TLS (secure) connection with the SMTP server
|
||||
|
||||
# Taiga's RabbitMQ settings - Variables to leave messages for the realtime and asynchronous events
|
||||
RABBITMQ_USER=taiga # user to connect to RabbitMQ
|
@ -1,4 +1,6 @@
|
||||
docker_compose_project_name: "taiga"
|
||||
database_type: "postgres"
|
||||
database_password: "{{taiga_database_password}}"
|
||||
docker_compose_project_name: "taigaio"
|
||||
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose.yml.backup"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{taigaio_database_password}}"
|
||||
repository_address: "https://github.com/taigaio/taiga-docker"
|
||||
|
@ -1,5 +1,34 @@
|
||||
- name: "include tasks update-repository-with-files.yml"
|
||||
include_tasks: update-repository-with-files.yml
|
||||
vars:
|
||||
detached_files:
|
||||
- "docker-compose.yml"
|
||||
- name: "backup docker-compose.yml if it exists"
|
||||
command: >
|
||||
mv "{{ docker_compose_file_path }}" "{{ docker_compose_backup_path }}"
|
||||
args:
|
||||
removes: "{{ docker_compose_file_path }}"
|
||||
become: true
|
||||
|
||||
- name: checkout repository
|
||||
ansible.builtin.shell: git checkout .
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
ignore_errors: true
|
||||
|
||||
- name: pull docker repository
|
||||
git:
|
||||
repo: "{{ repository_address }}"
|
||||
dest: "{{ repository_directory }}"
|
||||
update: yes
|
||||
notify: docker compose project setup
|
||||
become: true
|
||||
|
||||
- name: "restore docker-compose.yml from backup"
|
||||
command: >
|
||||
mv "{{ docker_compose_backup_path }}" "{{ docker_compose_file_path }}"
|
||||
args:
|
||||
removes: "{{ docker_compose_backup_path }}"
|
||||
become: true
|
||||
|
||||
- name: "copy docker-compose.yml"
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{ docker_compose_file_path }}"
|
||||
notify: docker compose project setup
|
@ -1,37 +0,0 @@
|
||||
- name: "backup docker-compose.yml if it exists"
|
||||
command: >
|
||||
mv "{{docker_compose_instance_directory}}{{ item }}" "/tmp/{{docker_compose_project_name}}-{{ item }}.backup"
|
||||
args:
|
||||
removes: "{{docker_compose_instance_directory}}{{ item }}"
|
||||
become: true
|
||||
loop: "{{ detached_files }}"
|
||||
|
||||
- name: checkout repository
|
||||
ansible.builtin.shell: git checkout .
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
ignore_errors: true
|
||||
|
||||
- name: pull docker repository
|
||||
git:
|
||||
repo: "{{ repository_address }}"
|
||||
dest: "{{ repository_directory | default(docker_compose_instance_directory) }}"
|
||||
update: yes
|
||||
notify: docker compose project setup
|
||||
become: true
|
||||
|
||||
- name: "restore docker-compose.yml from backup"
|
||||
command: >
|
||||
mv "/tmp/{{docker_compose_project_name}}-{{ item }}.backup" "{{docker_compose_instance_directory}}{{ item }}"
|
||||
args:
|
||||
removes: "/tmp/{{docker_compose_project_name}}-{{ item }}.backup"
|
||||
become: true
|
||||
loop: "{{ detached_files }}"
|
||||
|
||||
- name: "copy {{ item }}"
|
||||
template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: "{{docker_compose_instance_directory}}{{ item }}"
|
||||
loop: "{{ detached_files }}"
|
||||
notify: docker compose project setup
|
@ -1,4 +1,4 @@
|
||||
# This template needs to be included in docker-compose.yml containers, which depend on a database, redis and optional additional volumes
|
||||
# This template needs to be included in docker-compose.yml contaienrs, which depend on a database, redis and optional additional volumes
|
||||
depends_on:
|
||||
{% if not enable_central_database | bool %}
|
||||
database:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This template needs to be included in docker-compose.yml containers, which just depend on a database
|
||||
# This template needs to be included in docker-compose.yml contaienrs, which just depend on a database
|
||||
{% if not enable_central_database | bool %}
|
||||
depends_on:
|
||||
database:
|
||||
|
Loading…
Reference in New Issue
Block a user