infrastructure/ansible/roles/docker/files/nextcloud/docker-compose.yml

71 lines
2.1 KiB
YAML
Raw Normal View History

2020-03-08 18:12:12 +00:00
version: "2.3"
services:
nextcloud:
2020-04-24 22:12:49 +01:00
image: linuxserver/nextcloud:18.0.4-ls76
container_name: nextcloud
environment:
- PUID={{ docker_user.id }}
- PGID={{ docker_user.id }}
- TZ=Europe/London
volumes:
- ./nextcloud/config:/config/www/nextcloud/config
- ./nextcloud/apps:/config/www/nextcloud/apps
2020-03-15 11:51:23 +00:00
- ./nextcloud/nginx-default.conf:/config/nginx/site-confs/default
- /srv/nextcloud-data/data:/data
- /opt/gitea/repos:/repos:ro
- /mnt/media:/content:ro
restart: unless-stopped
tmpfs:
- /config/log
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.rule=Host(`intersect.jakehoward.tech`)"
- "traefik.http.routers.nextcloud.tls=true"
- "traefik.http.routers.nextcloud.tls.certresolver=le"
2020-03-18 21:35:17 +00:00
db:
image: postgres:12-alpine
restart: unless-stopped
2020-03-18 21:35:17 +00:00
volumes:
- ./postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=nextcloud
- POSTGRES_USER=nextcloud
db-backups:
image: prodrigestivill/postgres-backup-local:12-alpine
restart: unless-stopped
volumes:
- /scratch/db-backups:/backups
depends_on:
- db
environment:
- POSTGRES_HOST=db
- POSTGRES_PASSWORD=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_DB=nextcloud
- BACKUP_KEEP_MONTHS=1
- BACKUP_KEEP_WEEKS=1
redis:
image: redis:5-alpine
restart: unless-stopped
volumes:
- ./redis:/data
onlyoffice:
image: onlyoffice/documentserver
container_name: onlyoffice
restart: unless-stopped
environment:
- JWT_ENABLED=true
- JWT_SECRET={{ nextcloud.onlyoffice_jwt_secret }}
labels:
- "traefik.enable=true"
- "traefik.http.routers.onlyoffice.rule=Host(`onlyoffice.jakehoward.tech`)"
- "traefik.http.routers.onlyoffice.tls=true"
- "traefik.http.routers.onlyoffice.tls.certresolver=le"
- "traefik.http.routers.onlyoffice.middlewares=oo-header"
- "traefik.http.middlewares.oo-header.headers.customRequestHeaders.X-Forwarded-Proto=https"