fix nextcloud postgres

This commit is contained in:
peaklabs-dev
2024-10-09 17:03:43 +02:00
parent cd1998eebf
commit 3ba76c5068

View File

@@ -2,42 +2,50 @@
# slogan: NextCloud is a self-hosted, open-source platform that provides file storage, collaboration, and communication tools for seamless data management. # slogan: NextCloud is a self-hosted, open-source platform that provides file storage, collaboration, and communication tools for seamless data management.
# tags: cloud, collaboration, communication, filestorage, data # tags: cloud, collaboration, communication, filestorage, data
# logo: svgs/nextcloud.svg # logo: svgs/nextcloud.svg
# port: 80
services: services:
nextcloud: nextcloud:
image: lscr.io/linuxserver/nextcloud:latest image: lscr.io/linuxserver/nextcloud:latest
environment: environment:
- SERVICE_FQDN_NEXTCLOUD - SERVICE_FQDN_NEXTCLOUD_80
- PUID=1000 - PUID=1000
- PGID=1000 - PGID=1000
- TZ=Europe/Paris - TZ=${TZ:-Europe/Paris}
- POSTGRES_DB=${POSTGRES_DB:-nextcloud} - POSTGRES_DB=${POSTGRES_DB:-nextcloud}
- POSTGRES_USER=$SERVICE_USER_POSTGRES - POSTGRES_USER=${SERVICE_USER_POSTGRES}
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRES_HOST=postgresql - POSTGRES_HOST=nextcloud-db
- REDIS_HOST=redis - REDIS_HOST=redis
- REDIS_PORT=6379 - REDIS_PORT=6379
volumes: volumes:
- nextcloud-config:/config - nextcloud-config:/config
- nextcloud-data:/data - nextcloud-data:/data
depends_on:
nextcloud-db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:80"] test: ["CMD", "curl", "-f", "http://127.0.0.1:80"]
interval: 2s interval: 2s
timeout: 10s timeout: 10s
retries: 15 retries: 15
postgresql:
nextcloud-db:
image: postgres:16-alpine image: postgres:16-alpine
volumes: volumes:
- postgresql-data:/var/lib/postgresql/data - postgresql-data:/var/lib/postgresql/data
environment: environment:
- POSTGRES_USER=$SERVICE_USER_POSTGRES - POSTGRES_USER=${SERVICE_USER_POSTGRES}
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRES_DB=${POSTGRES_DB:-nextcloud} - POSTGRES_DB=${POSTGRES_DB:-nextcloud}
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s interval: 5s
timeout: 20s timeout: 20s
retries: 10 retries: 10
redis: redis:
image: "redis:7.4-alpine" image: "redis:7.4-alpine"
volumes: volumes: