|
2 | 2 | # slogan: NextCloud is a self-hosted, open-source platform that provides file storage, collaboration, and communication tools for seamless data management.
|
3 | 3 | # tags: cloud, collaboration, communication, filestorage, data
|
4 | 4 | # logo: svgs/nextcloud.svg
|
| 5 | +# port: 80 |
5 | 6 |
|
6 | 7 | services:
|
7 | 8 | nextcloud:
|
8 | 9 | image: lscr.io/linuxserver/nextcloud:latest
|
9 | 10 | environment:
|
10 |
| - - SERVICE_FQDN_NEXTCLOUD |
| 11 | + - SERVICE_FQDN_NEXTCLOUD_80 |
11 | 12 | - PUID=1000
|
12 | 13 | - PGID=1000
|
13 |
| - - TZ=Europe/Paris |
| 14 | + - TZ=${TZ:-Europe/Paris} |
14 | 15 | - 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 |
18 | 19 | - REDIS_HOST=redis
|
19 | 20 | - REDIS_PORT=6379
|
20 | 21 | volumes:
|
21 | 22 | - nextcloud-config:/config
|
22 | 23 | - nextcloud-data:/data
|
| 24 | + depends_on: |
| 25 | + nextcloud-db: |
| 26 | + condition: service_healthy |
| 27 | + redis: |
| 28 | + condition: service_healthy |
23 | 29 | healthcheck:
|
24 | 30 | test: ["CMD", "curl", "-f", "http://127.0.0.1:80"]
|
25 | 31 | interval: 2s
|
26 | 32 | timeout: 10s
|
27 | 33 | retries: 15
|
28 |
| - postgresql: |
| 34 | + |
| 35 | + nextcloud-db: |
29 | 36 | image: postgres:16-alpine
|
30 | 37 | volumes:
|
31 | 38 | - postgresql-data:/var/lib/postgresql/data
|
32 | 39 | 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} |
35 | 42 | - POSTGRES_DB=${POSTGRES_DB:-nextcloud}
|
36 | 43 | healthcheck:
|
37 | 44 | test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
38 | 45 | interval: 5s
|
39 | 46 | timeout: 20s
|
40 | 47 | retries: 10
|
| 48 | + |
41 | 49 | redis:
|
42 | 50 | image: "redis:7.4-alpine"
|
43 | 51 | volumes:
|
|
0 commit comments