Add shared postgres (wip)

This commit is contained in:
Peter Smit
2025-09-26 11:37:14 +02:00
parent 8ae7ba2c7f
commit 0d20dc3153
10 changed files with 439 additions and 15 deletions

View File

@@ -0,0 +1,47 @@
services:
nextcloud_db:
# Remove this service - using shared-postgres instead
nextcloud:
image: nextcloud:31.0.9
restart: always
ports:
- 8081:80
volumes:
- ${NEXTCLOUD_DATA_DIR}:/var/www/html
environment:
- POSTGRES_HOST=shared-postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=${NEXTCLOUD_POSTGRES_DB}
- POSTGRES_USER=${NEXTCLOUD_POSTGRES_USER}
- POSTGRES_PASSWORD=${NEXTCLOUD_POSTGRES_PASSWORD}
- REDIS_HOST=nextcloud-redis
- REDIS_PORT=6379
- NEXTCLOUD_TRUSTED_DOMAINS=${NEXTCLOUD_DOMAIN}
depends_on:
shared-postgres:
condition: service_healthy
networks:
- nextcloud
- postgres-network
cron:
image: nextcloud:31.0.9
container_name: nextcloud-cron
volumes:
- ${NEXTCLOUD_DATA_DIR}:/var/www/html
entrypoint: /cron.sh
restart: always
networks:
- nextcloud
nextcloud-redis:
image: redis:7
restart: always
networks:
- nextcloud
networks:
nextcloud:
postgres-network:
external: true