2018-09-21 22:37:53 +00:00
|
|
|
---
|
|
|
|
- name: Create Nextcloud directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ nextcloud_data_directory }}/nextcloud"
|
|
|
|
- "{{ nextcloud_data_directory }}/mysql"
|
|
|
|
|
|
|
|
- name: Nextcloud Mysql Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: nextcloud-mysql
|
|
|
|
image: mysql:5.7
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ nextcloud_data_directory }}/mysql:/var/lib/mysql:rw"
|
|
|
|
env:
|
|
|
|
MYSQL_DATABASE: nextcloud
|
|
|
|
MYSQL_USER: nextcloud-user
|
|
|
|
MYSQL_PASSWORD: nextcloud-pass
|
2018-12-08 22:44:51 +00:00
|
|
|
MYSQL_ROOT_PASSWORD: nextcloud-secret
|
2018-09-21 22:37:53 +00:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
|
|
|
|
|
|
|
- name: Nextcloud Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: nextcloud
|
|
|
|
image: nextcloud:14
|
|
|
|
pull: true
|
|
|
|
links:
|
|
|
|
- nextcloud-mysql:mysql
|
|
|
|
volumes:
|
|
|
|
- "{{ nextcloud_data_directory }}/nextcloud:/var/www/html:rw"
|
|
|
|
ports:
|
|
|
|
- "8080:80"
|
|
|
|
env:
|
|
|
|
MYSQL_HOST: mysql
|
|
|
|
MYSQL_DATABASE: nextcloud
|
|
|
|
MYSQL_USER: nextcloud-user
|
2018-10-02 22:03:56 +00:00
|
|
|
MYSQL_PASSWORD: nextcloud-pass
|
2019-04-11 22:03:11 +00:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
2018-11-28 23:13:24 +00:00
|
|
|
labels:
|
|
|
|
traefik.backend: "nextcloud"
|
|
|
|
traefik.frontend.rule: "Host:nextcloud.{{ ansible_nas_domain }}"
|
2019-04-11 22:03:11 +00:00
|
|
|
traefik.enable: "{{ nextcloud_available_externally }}"
|
2018-11-28 23:13:24 +00:00
|
|
|
traefik.port: "80"
|