mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented a new docker compose structure which seperates between docker compose files and environment variable file to protect credentials better. Also did recatoring. Changes not fully tested
This commit is contained in:
@@ -6,6 +6,16 @@
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose.directories.instance}}docker-compose.yml
|
||||
- name: "create {{docker_compose.files.docker_compose}}"
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{docker_compose.files.docker_compose}}"
|
||||
notify: docker compose project setup
|
||||
|
||||
- name: "create {{docker_compose.files.env}}"
|
||||
template:
|
||||
src: "env.j2"
|
||||
dest: "{{docker_compose.files.env}}"
|
||||
mode: '770'
|
||||
force: yes
|
||||
notify: docker compose project setup
|
||||
|
@@ -4,7 +4,7 @@ services:
|
||||
|
||||
application:
|
||||
image: "friendica:{{applications.friendica.version}}"
|
||||
restart: {{docker_restart_policy}}
|
||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
ports:
|
||||
@@ -25,36 +25,6 @@ services:
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
environment:
|
||||
FRIENDICA_URL: https://{{domain}}
|
||||
HOSTNAME: {{domain}}
|
||||
FRIENDICA_NO_VALIDATION: false
|
||||
|
||||
# Debugging
|
||||
FRIENDICA_DEBUGGING: false
|
||||
FRIENDICA_LOGLEVEL: 5
|
||||
FRIENDICA_LOGGER: stream
|
||||
FRIENDICA_LOGFILE: php://stdout
|
||||
|
||||
# Database Configuration
|
||||
MYSQL_HOST: "{{database_host}}:{{database_port}}"
|
||||
MYSQL_DATABASE: {{database_name}}
|
||||
MYSQL_USER: {{database_username}}
|
||||
MYSQL_PASSWORD: {{database_password}}
|
||||
|
||||
# Email Configuration
|
||||
SMTP: {{system_email.host}}
|
||||
SMTP_DOMAIN: {{system_email.domain}}
|
||||
SMTP_PORT: {{system_email.smtp_port}}
|
||||
SMTP_AUTH_USER: {{system_email.username}}
|
||||
SMTP_AUTH_PASS: {{system_email.password}}
|
||||
SMTP_TLS: {{ 'on' if system_email.tls else 'off' }}
|
||||
SMTP_STARTTLS: {{ 'on' if system_email.start_tls else 'off' }}
|
||||
SMTP_FROM: {{system_email.local}}
|
||||
|
||||
# Administrator Credentials
|
||||
FRIENDICA_ADMIN_MAIL: {{administrator_email}}
|
||||
MAILNAME: {{administrator_email}}
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
||||
|
||||
|
29
roles/docker-friendica/templates/env.j2
Normal file
29
roles/docker-friendica/templates/env.j2
Normal file
@@ -0,0 +1,29 @@
|
||||
FRIENDICA_URL= https://{{domain}}
|
||||
HOSTNAME= {{domain}}
|
||||
FRIENDICA_NO_VALIDATION= false
|
||||
|
||||
# Debugging
|
||||
FRIENDICA_DEBUGGING= false
|
||||
FRIENDICA_LOGLEVEL= 5
|
||||
FRIENDICA_LOGGER= stream
|
||||
FRIENDICA_LOGFILE= php=//stdout
|
||||
|
||||
# Database Configuration
|
||||
MYSQL_HOST= "{{database_host}}:{{database_port}}"
|
||||
MYSQL_DATABASE= {{database_name}}
|
||||
MYSQL_USER= {{database_username}}
|
||||
MYSQL_PASSWORD= {{database_password}}
|
||||
|
||||
# Email Configuration
|
||||
SMTP= {{system_email.host}}
|
||||
SMTP_DOMAIN= {{system_email.domain}}
|
||||
SMTP_PORT= {{system_email.smtp_port}}
|
||||
SMTP_AUTH_USER= {{system_email.username}}
|
||||
SMTP_AUTH_PASS= {{system_email.password}}
|
||||
SMTP_TLS= {{ 'on' if system_email.tls else 'off' }}
|
||||
SMTP_STARTTLS= {{ 'on' if system_email.start_tls else 'off' }}
|
||||
SMTP_FROM= {{system_email.local}}
|
||||
|
||||
# Administrator Credentials
|
||||
FRIENDICA_ADMIN_MAIL= {{administrator_email}}
|
||||
MAILNAME= {{administrator_email}}
|
Reference in New Issue
Block a user