parent
429a61c646
commit
4532f8d4e3
@ -1,99 +0,0 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data:Z
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=CHANGEME
|
||||
- POSTGRES_DB=nextcloud
|
||||
- POSTGRES_USER=nextcloud
|
||||
|
||||
app:
|
||||
build: ./
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
- /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
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: unless-stopped
|
||||
|
||||
web:
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
hostname: web
|
||||
volumes:
|
||||
- nextcloud:/var/www/html:ro
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro # https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html
|
||||
expose:
|
||||
- 80
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
- default
|
||||
- proxy
|
||||
- appapi
|
||||
|
||||
cron:
|
||||
build: ./
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- default
|
||||
- appapi
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
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
|
||||
- appapi
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- app
|
||||
# env_file:
|
||||
# - appapi.env
|
||||
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:
|
||||
|
||||
networks:
|
||||
proxy: # This is an external network created for nginx-proxy-manager used by this setup. It must be edited to match your environment.
|
||||
name: proxy-manager_proxy_network
|
||||
external: true
|
||||
|
||||
appapi: # This network is required in order for AppAPI to function correctly. Using "host" networking as in some examples may fail.
|
||||
name: appapi_network
|
||||
@ -0,0 +1,145 @@
|
||||
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
|
||||
Loading…
Reference in new issue