Skip to content

Commit 3ba76c5

Browse files
committed
fix nextcloud postgres
1 parent cd1998e commit 3ba76c5

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

templates/compose/nextcloud-with-postgres.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,50 @@
22
# slogan: NextCloud is a self-hosted, open-source platform that provides file storage, collaboration, and communication tools for seamless data management.
33
# tags: cloud, collaboration, communication, filestorage, data
44
# logo: svgs/nextcloud.svg
5+
# port: 80
56

67
services:
78
nextcloud:
89
image: lscr.io/linuxserver/nextcloud:latest
910
environment:
10-
- SERVICE_FQDN_NEXTCLOUD
11+
- SERVICE_FQDN_NEXTCLOUD_80
1112
- PUID=1000
1213
- PGID=1000
13-
- TZ=Europe/Paris
14+
- TZ=${TZ:-Europe/Paris}
1415
- POSTGRES_DB=${POSTGRES_DB:-nextcloud}
15-
- POSTGRES_USER=$SERVICE_USER_POSTGRES
16-
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
17-
- POSTGRES_HOST=postgresql
16+
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
17+
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
18+
- POSTGRES_HOST=nextcloud-db
1819
- REDIS_HOST=redis
1920
- REDIS_PORT=6379
2021
volumes:
2122
- nextcloud-config:/config
2223
- nextcloud-data:/data
24+
depends_on:
25+
nextcloud-db:
26+
condition: service_healthy
27+
redis:
28+
condition: service_healthy
2329
healthcheck:
2430
test: ["CMD", "curl", "-f", "http://127.0.0.1:80"]
2531
interval: 2s
2632
timeout: 10s
2733
retries: 15
28-
postgresql:
34+
35+
nextcloud-db:
2936
image: postgres:16-alpine
3037
volumes:
3138
- postgresql-data:/var/lib/postgresql/data
3239
environment:
33-
- POSTGRES_USER=$SERVICE_USER_POSTGRES
34-
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
40+
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
41+
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
3542
- POSTGRES_DB=${POSTGRES_DB:-nextcloud}
3643
healthcheck:
3744
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
3845
interval: 5s
3946
timeout: 20s
4047
retries: 10
48+
4149
redis:
4250
image: "redis:7.4-alpine"
4351
volumes:

0 commit comments

Comments
 (0)