My docker-compose setup for Nextcloud
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.2 KiB

version: '3.5'
services:
db:
image: postgres:12-alpine
restart: unless-stopped
volumes:
- db:/var/lib/postgresql/data
env_file:
- db.env
app:
image: nextcloud:apache
restart: unless-stopped
volumes:
- nextcloud:/var/www/html
environment:
- POSTGRES_HOST=db
- OVERWRITEHOST=oenone.de
- OVERWRITEPROTOCOL=https
- APACHE_DISABLE_REWRITE_IP=1
- TRUSTED_PROXIES=localhost
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.entrypoints=websecure"
- "traefik.http.routers.nextcloud.rule=Host(`oenone.de`)"
- "traefik.http.routers.nextcloud.middlewares=nextcloud,nextcloud_redirect"
- "traefik.http.middlewares.nextcloud.headers.contentSecurityPolicy=frame-ancestors 'self' oenone.de"
- "traefik.http.middlewares.nextcloud_redirect.redirectregex.regex=/.well-known/(card|cal)dav"
- "traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement=/remote.php/dav/"
env_file:
- db.env
depends_on:
- db
networks:
- traefik_proxy
- default
volumes:
db:
nextcloud:
networks:
traefik_proxy:
external: true