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.
145 lines
4.1 KiB
145 lines
4.1 KiB
services:
|
|
# Note: PostgreSQL is an external service. You can find more information about the configuration here:
|
|
# https://hub.docker.com/_/postgres
|
|
db:
|
|
image: postgres:18-alpine
|
|
# Note: Check the recommend version here: https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html#server
|
|
restart: always
|
|
volumes:
|
|
- db:/var/lib/postgresql/data:Z
|
|
environment:
|
|
- POSTGRES_PASSWORD=CHANGEME
|
|
- POSTGRES_DB=nextcloud
|
|
- POSTGRES_USER=nextcloud
|
|
|
|
app:
|
|
build: ./
|
|
restart: always
|
|
volumes:
|
|
- nextcloud:/var/www/html:Z
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
networks:
|
|
- default
|
|
- appapi
|
|
environment:
|
|
- REDIS_HOST=redis
|
|
- POSTGRES_HOST=db
|
|
- POSTGRES_PASSWORD=CHANGEME
|
|
- POSTGRES_DB=nextcloud
|
|
- POSTGRES_USER=nextcloud
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
|
|
# Note: Redis is an external service. You can find more information about the configuration here:
|
|
# https://hub.docker.com/_/redis
|
|
redis:
|
|
image: redis:alpine
|
|
restart: always
|
|
|
|
# Note: Nginx is an external service. You can find more information about the configuration here:
|
|
# https://hub.docker.com/_/nginx/
|
|
web:
|
|
image: nginx:alpine
|
|
restart: always
|
|
hostname: web
|
|
volumes:
|
|
- nextcloud:/var/www/html:z,ro
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro # https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html
|
|
environment:
|
|
- VIRTUAL_HOST=
|
|
- LETSENCRYPT_HOST=
|
|
- LETSENCRYPT_EMAIL=
|
|
depends_on:
|
|
- app
|
|
networks:
|
|
- default
|
|
- proxy-tier
|
|
- appapi
|
|
|
|
# Note: Nginx-proxy is an external service. You can find more information about the configuration here:
|
|
# Warning: Do not use :latest tags of nginx-proxy unless absolutely sure about the consequences.
|
|
# https://hub.docker.com/r/nginxproxy/nginx-proxy
|
|
proxy:
|
|
build: ./proxy
|
|
restart: always
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
labels:
|
|
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
|
|
volumes:
|
|
- certs:/etc/nginx/certs:z,ro
|
|
- vhost.d:/etc/nginx/vhost.d:z
|
|
- html:/usr/share/nginx/html:z
|
|
- /var/run/docker.sock:/tmp/docker.sock:z,ro
|
|
networks:
|
|
- proxy-tier-tier
|
|
|
|
# Note: Letsencrypt companion is an external service. You can find more information about the configuration here:
|
|
# https://hub.docker.com/r/nginxproxy/acme-companion
|
|
letsencrypt-companion:
|
|
image: nginxproxy/acme-companion
|
|
restart: always
|
|
volumes:
|
|
- certs:/etc/nginx/certs:z
|
|
- acme:/etc/acme.sh:z
|
|
- vhost.d:/etc/nginx/vhost.d:z
|
|
- html:/usr/share/nginx/html:z
|
|
- /var/run/docker.sock:/var/run/docker.sock:z,ro
|
|
environment:
|
|
- DEFAULT_EMAIL=
|
|
networks:
|
|
- proxy-tier
|
|
depends_on:
|
|
- proxy
|
|
|
|
cron:
|
|
build: ./
|
|
restart: always
|
|
networks:
|
|
- default
|
|
- appapi
|
|
volumes:
|
|
- nextcloud:/var/www/html:z
|
|
# NOTE: The `volumes` config of the `cron` and `app` containers must match
|
|
entrypoint: /cron.sh
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
|
|
appapi:
|
|
platform: linux/amd64
|
|
container_name: appapi
|
|
hostname: appapi
|
|
privileged: true
|
|
image: ghcr.io/nextcloud/nextcloud-appapi-harp:release
|
|
networks:
|
|
- proxy-tier
|
|
- appapi
|
|
restart: always
|
|
depends_on:
|
|
- app
|
|
environment:
|
|
# NC_HAPROXY_PASSWORD needs to be at least 12 chars long. This variable exists for backward compatibility with the DSP image
|
|
# ToDo: verify whether this variable is still required
|
|
- NC_HAPROXY_PASSWORD=CHANGEME1234
|
|
# HP_SHARED_KEY needs to be at least 12 chars long.
|
|
- HP_SHARED_KEY=CHANGEME1234
|
|
# NC_INSTANCE_URL must be the externally accessible URL of the Nextcloud instance
|
|
- NC_INSTANCE_URL=https://external-nextcloud.url
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
volumes:
|
|
db:
|
|
nextcloud:
|
|
certs:
|
|
acme:
|
|
vhost.d:
|
|
html:
|
|
|
|
networks:
|
|
proxy-tier:
|
|
appapi: # This network is required in order for AppAPI to function correctly. Using "host" networking as in some examples may fail.
|
|
name: appapi_network |