mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-23 18:55:03 +01:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
---
|
|
- name: recieve {{domain}} certificate
|
|
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
|
|
|
- name: configure {{domain}}.conf
|
|
template: src=templates/nextcloud.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
|
notify: restart nginx
|
|
|
|
- name: "setup nextcloud"
|
|
docker_compose:
|
|
project_name: nextcloud
|
|
definition:
|
|
application:
|
|
image: nextcloud
|
|
restart: always
|
|
links:
|
|
- database
|
|
volumes:
|
|
- nextcloud-data:/var/www/html
|
|
ports:
|
|
- "{{http_port}}:80"
|
|
environment:
|
|
MYSQL_DATABASE: "nextcloud"
|
|
MYSQL_USER: "nextcloud"
|
|
MYSQL_PASSWORD: "{{nextcloud_database_password}}"
|
|
MYSQL_HOST: database:3306
|
|
database:
|
|
image: mariadb
|
|
environment:
|
|
MYSQL_DATABASE: "nextcloud"
|
|
MYSQL_USER: "nextcloud"
|
|
MYSQL_PASSWORD: "{{nextcloud_database_password}}"
|
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
|
volumes:
|
|
- nextcloud-database:/var/lib/mysql
|
|
restart: always
|
|
expose:
|
|
- "3306"
|