Passwords, domains, emails, api keys are changed of course
services:
nextcloud-db:
image: mariadb:lts-jammy
container_name: nextcloud-db
restart: unless-stopped
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
networks:
- caddy
volumes:
- db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: s3cret
MYSQL_PASSWORD: p4ssw0rd
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
nextcloud-cache:
image: redis:7.0.4-alpine
container_name: nextcloud-cache
restart: unless-stopped
networks:
- caddy
command: redis-server --requirepass r3d1s
nextcloud-app:
image: nextcloud:stable-fpm-alpine
container_name: nextcloud-app
restart: unless-stopped
networks:
- caddy
volumes:
- ./nextcloud_data/:/var/www/html
depends_on:
- nextcloud-db
- nextcloud-cache
environment:
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: p4ssw0rd
MYSQL_HOST: nextcloud-db
NEXTCLOUD_ADMIN_USER: admin
NEXTCLOUD_ADMIN_PASSWORD: n3xtcl0ud-p4ssw0rd
NEXTCLOUD_TRUSTED_DOMAINS: nc.yourdomain.com
REDIS_HOST: nextcloud-cache
REDIS_HOST_PASSWORD: r3d1s
SMTP_HOST: smtp.sendgrid.net
SMTP_SECURE: tls
SMTP_PORT: 587
SMTP_AUTHTYPE: PLAIN
SMTP_NAME: apikey # this is for SendGrid
SMTP_PASSWORD: SG.bl4bl4.......>>>
MAIL_FROM_ADDRESS: no-reply
MAIL_DOMAIN: nc.yourdomain.com # fill your domain here eg. mydomain.com
labels:
caddy: nc.yourdomain.com # fill your domain here eg. nextcloud.mydomain.com
caddy.tls: myemail@email.com # fill your email here
caddy.file_server: ""
caddy.root: "* /nextcloud/var/www/html"
caddy.php_fastcgi: "{{upstreams 9000}}"
caddy.php_fastcgi.root: "/var/www/html"
caddy.php_fastcgi.env: "front_controller_active true"
caddy.encode: gzip
caddy.header: /*
caddy.header.Strict-Transport-Security: '"max-age=15552000;"'
caddy.redir_0: "/.well-known/carddav /remote.php/dav"
caddy.redir_1: "/.well-known/caldav /remote.php/dav"
caddy.@forbidden.path: "/.htaccess /data/* /config/* /db_structure /.xml /README /3rdparty/* /lib/* /templates/* /occ /console.php"
caddy.respond: "@forbidden 403"
nextcloud-cron:
image: nextcloud:stable-fpm-alpine
container_name: nextcloud-cron
restart: always
volumes:
- ./nextcloud_data:/var/www/html
networks:
- caddy
entrypoint: /cron.sh
depends_on:
- nextcloud-db
volumes:
db:
networks:
caddy:
external: true