2022-12-29 21:13:31 +00:00
|
|
|
# vim: ft=yaml.ansible
|
2019-01-26 16:54:45 +00:00
|
|
|
---
|
2022-08-31 18:10:42 +00:00
|
|
|
- name: upload vhost config for cloud.data.coop
|
|
|
|
template:
|
|
|
|
src: files/configs/nextcloud/vhost
|
2022-11-26 08:15:18 +00:00
|
|
|
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.nextcloud.domain }}"
|
2022-09-02 10:23:19 +00:00
|
|
|
notify: "restart nginx"
|
2022-08-31 18:10:42 +00:00
|
|
|
|
2021-10-09 12:13:18 +00:00
|
|
|
- name: setup nextcloud containers
|
|
|
|
docker_compose:
|
|
|
|
project_name: "nextcloud"
|
|
|
|
pull: "yes"
|
|
|
|
definition:
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: "postgres:10"
|
|
|
|
restart: "unless-stopped"
|
|
|
|
networks:
|
|
|
|
- "nextcloud"
|
|
|
|
volumes:
|
2022-11-26 08:15:18 +00:00
|
|
|
- "{{ services.nextcloud.volume_folder }}/postgres:/var/lib/postgresql/data"
|
2021-10-09 12:13:18 +00:00
|
|
|
environment:
|
|
|
|
POSTGRES_DB: "nextcloud"
|
|
|
|
POSTGRES_PASSWORD: "{{ postgres_passwords.nextcloud }}"
|
|
|
|
POSTGRES_USER: "nextcloud"
|
2022-11-22 16:15:59 +00:00
|
|
|
|
|
|
|
redis:
|
|
|
|
image: "redis:7-alpine"
|
|
|
|
restart: "unless-stopped"
|
|
|
|
command: "redis-server --requirepass {{ nextcloud_secrets.redis_password }}"
|
|
|
|
tmpfs:
|
|
|
|
- /var/lib/redis
|
|
|
|
networks:
|
|
|
|
- "nextcloud"
|
2022-11-22 16:40:55 +00:00
|
|
|
|
|
|
|
cron:
|
2022-11-26 08:15:18 +00:00
|
|
|
image: "nextcloud:{{ services.nextcloud.version }}"
|
2022-11-22 16:40:55 +00:00
|
|
|
restart: "unless-stopped"
|
|
|
|
entrypoint: "/cron.sh"
|
|
|
|
networks:
|
|
|
|
- "nextcloud"
|
|
|
|
volumes:
|
2022-11-26 08:15:18 +00:00
|
|
|
- "{{ services.nextcloud.volume_folder }}/app:/var/www/html"
|
2022-11-22 16:40:55 +00:00
|
|
|
depends_on:
|
|
|
|
- "postgres"
|
|
|
|
- "redis"
|
2021-10-09 12:13:18 +00:00
|
|
|
|
|
|
|
app:
|
2022-11-26 08:15:18 +00:00
|
|
|
image: "nextcloud:{{ services.nextcloud.version }}"
|
2021-10-09 12:13:18 +00:00
|
|
|
restart: "unless-stopped"
|
|
|
|
networks:
|
|
|
|
- "nextcloud"
|
2022-11-22 16:45:13 +00:00
|
|
|
- "postfix"
|
2021-10-09 12:13:18 +00:00
|
|
|
- "external_services"
|
|
|
|
volumes:
|
2022-11-26 08:15:18 +00:00
|
|
|
- "{{ services.nextcloud.volume_folder }}/app:/var/www/html"
|
2021-10-09 12:13:18 +00:00
|
|
|
environment:
|
2022-11-26 08:15:18 +00:00
|
|
|
VIRTUAL_HOST: "{{ services.nextcloud.domain }}"
|
|
|
|
LETSENCRYPT_HOST: "{{ services.nextcloud.domain }}"
|
2021-10-09 12:13:18 +00:00
|
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
2022-11-22 16:15:59 +00:00
|
|
|
POSTGRES_HOST: "postgres"
|
2021-10-09 12:13:18 +00:00
|
|
|
POSTGRES_DB: "nextcloud"
|
|
|
|
POSTGRES_USER: "nextcloud"
|
|
|
|
POSTGRES_PASSWORD: "{{ postgres_passwords.nextcloud }}"
|
2022-11-22 16:15:59 +00:00
|
|
|
REDIS_HOST: "redis"
|
|
|
|
REDIS_HOST_PASSWORD: "{{ nextcloud_secrets.redis_password }}"
|
2022-11-22 16:40:55 +00:00
|
|
|
depends_on:
|
|
|
|
- "postgres"
|
|
|
|
- "redis"
|
2019-01-26 16:54:45 +00:00
|
|
|
|
2021-10-09 12:13:18 +00:00
|
|
|
networks:
|
|
|
|
nextcloud:
|
|
|
|
postfix:
|
|
|
|
external: true
|
|
|
|
external_services:
|
2022-08-31 18:10:42 +00:00
|
|
|
external: true
|