services-next/docker-compose.yml

83 lines
1.5 KiB
YAML

volumes:
# NextCloud
nc-data:
db-data:
networks:
reverse_proxy-tier:
external: true
nextcloud:
external: false
services:
# NextCloud
nextcloud:
build: ./images/nc
restart: always
volumes:
- nc-data:/var/www/html
- ./config/nc:/var/www/html/config:rw
environment:
- TRUSTED_PROXIES=172.16.0.0/12 192.168.0.0/16 10.0.0.0/8 fc00::/7 fe80::/10 2001:db8::/32
- TRUSTED_DOMAINS=palta.cyou,bard.palta.cyou
- OVERWRITEPROTOCOL=https
- POSTGRES_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
- nc_config.env
networks:
- nextcloud
depends_on:
- db
- redis
# janitor
nextcloud-janitor:
build: ./images/nc
restart: always
volumes_from:
- nextcloud:rw
entrypoint: /cron.sh
networks:
- nextcloud
depends_on:
- db
- redis
# Frontend php proxy
nextcloud-front:
build: ./images/ngx
restart: always
environment:
- VIRTUAL_HOST=palta.cyou
- LETSENCRYPT_HOST=palta.cyou
volumes:
- nc-data:/var/www/html:ro
depends_on:
- nextcloud
networks:
- nextcloud
- reverse_proxy-tier
# db
db:
image: postgres:14-alpine
restart: always
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
env_file:
- db.env
shm_size: 512MB
networks:
- nextcloud
redis:
image: redis:alpine
restart: always
networks:
- nextcloud