diff --git a/deployer/group_vars/all/vars.yml b/deployer/group_vars/all/vars.yml index e3d9e6d..5bf1ded 100644 --- a/deployer/group_vars/all/vars.yml +++ b/deployer/group_vars/all/vars.yml @@ -17,7 +17,7 @@ wordpress: gitea: version: 1.12.1 synapse: - version: v1.18.0 + version: v1.19.2 drupal: version: 8.8.5-apache @@ -168,3 +168,21 @@ sites: registration_shared_secret: "{{ vault_synapse_registration_shared_secret }}" # Others max_upload_size: 20M + + - slug: cloud # Shorthand name to use as directory/file name + # The site URL (without www) + url: cloud.luxeylab.net + # Ask nginx to redirect url to www + # Else, we redirect www to url + redirect_to_www: no + # What kind of site is that? + type: nextcloud + # Subnet addresses + subnet_cidr_address: 172.27.8.0/24 + subnet_gateway_ip: 172.27.8.1 + subnet_nginx_ip: 172.27.8.2 + subnet_site_ip: 172.27.8.3 + # MySQL + mysql_database: lexperimental + mysql_username: lexperimental + mysql_password: "{{ vault_lexperimental_mysql_password }}" \ No newline at end of file diff --git a/deployer/roles/build/templates/nextcloud/docker-compose.yml.j2 b/deployer/roles/build/templates/nextcloud/docker-compose.yml.j2 new file mode 100644 index 0000000..c81fdad --- /dev/null +++ b/deployer/roles/build/templates/nextcloud/docker-compose.yml.j2 @@ -0,0 +1,44 @@ +version: '3' + +# Generated by ansible for site {{ site.url }} +# On network {{ site.subnet_cidr_address }}: +# - web server (nginx) at {{ site.subnet_nginx_ip }} +# - php-fpm (wordpress) at {{ site.subnet_site_ip }} + +services: + site: + image: nextcloud:latest-apache + restart: always + environment: + MYSQL_HOST: "{{ site.subnet_gateway_ip }}" + MYSQL_USER: "{{ site.mysql_username }}" + MYSQL_PASSWORD: "{{ site.mysql_password }}" + MYSQL_DATABASE: "{{ site.mysql_database }}" + volumes: + - "html_data:/var/www/html" + - "{{ site_data_path }}:/var/www/html/wp-content" + networks: + net: + ipv4_address: "{{ site.subnet_site_ip }}" + + nginx: + build: nginx + restart: always + depends_on: + - site + volumes_from: + - site + networks: + net: + ipv4_address: "{{ site.subnet_nginx_ip }}" + + +networks: + net: + ipam: + driver: default + config: + - subnet: "{{ site.subnet_cidr_address }}" + +volumes: + html_data: diff --git a/deployer/roles/build/templates/nextcloud/nginx.host.j2 b/deployer/roles/build/templates/nextcloud/nginx.host.j2 new file mode 100644 index 0000000..e69de29 diff --git a/deployer/roles/build/templates/synapse/homeserver.yaml.j2 b/deployer/roles/build/templates/synapse/homeserver.yaml.j2 index 49899c2..711107a 100644 --- a/deployer/roles/build/templates/synapse/homeserver.yaml.j2 +++ b/deployer/roles/build/templates/synapse/homeserver.yaml.j2 @@ -1622,19 +1622,15 @@ password_config: email: # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'. # - #smtp_host: mail.server smtp_host: "{{ site.smtp_host }}" # The port on the mail server for outgoing SMTP. Defaults to 25. # - #smtp_port: 587 smtp_port: {{ site.smtp_port }} # Username/password for authentication to the SMTP server. By default, no # authentication is attempted. # - # smtp_user: "exampleusername" - # smtp_pass: "examplepassword" smtp_user: "{{ site.smtp_username }}" smtp_pass: "{{ site.smtp_password }}"