|
6 | 6 |
|
7 | 7 | services:
|
8 | 8 | docmost:
|
9 |
| - image: 'docmost/docmost:latest' |
| 9 | + image: "docmost/docmost:latest" |
10 | 10 | depends_on:
|
11 |
| - - db |
12 |
| - - redis |
| 11 | + postgresql: |
| 12 | + condition: service_healthy |
| 13 | + redis: |
| 14 | + condition: service_healthy |
13 | 15 | environment:
|
14 | 16 | - SERVICE_FQDN_DOCMOST_3000
|
15 | 17 | - APP_SECRET=$SERVICE_BASE64_APPKEY
|
16 | 18 | - APP_URL=$SERVICE_FQDN_DOCMOST_3000
|
17 |
| - - 'DATABASE_URL=postgresql://$SERVICE_USER_POSTGRES:$SERVICE_PASSWORD_POSTGRES@db/docmost?schema=public' |
18 |
| - - 'REDIS_URL=redis://redis:6379' |
19 |
| - restart: unless-stopped |
| 19 | + - DATABASE_URL=postgresql://$SERVICE_USER_POSTGRES:$SERVICE_PASSWORD_POSTGRES@postgresql/docmost?schema=public |
| 20 | + - REDIS_URL=redis://redis:6379 |
20 | 21 | volumes:
|
21 |
| - - 'docmost:/app/data/storage' |
| 22 | + - "docmost:/app/data/storage" |
22 | 23 | healthcheck:
|
23 | 24 | test:
|
24 | 25 | - CMD
|
25 | 26 | - curl
|
26 |
| - - '-f' |
27 |
| - - 'http://127.0.0.1:3000' |
| 27 | + - "-f" |
| 28 | + - "http://127.0.0.1:3000" |
28 | 29 | interval: 2s
|
29 | 30 | timeout: 10s
|
30 |
| - retries: 30 |
31 |
| - db: |
32 |
| - image: 'postgres:16-alpine' |
| 31 | + retries: 20 |
| 32 | + postgresql: |
| 33 | + image: "postgres:16-alpine" |
33 | 34 | environment:
|
34 | 35 | - POSTGRES_USER=$SERVICE_USER_POSTGRES
|
35 | 36 | - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
|
36 | 37 | - POSTGRES_DB=docmost
|
37 |
| - restart: unless-stopped |
38 | 38 | volumes:
|
39 |
| - - 'db_data:/var/lib/postgresql/data' |
| 39 | + - "postgresql-data:/var/lib/postgresql/data" |
40 | 40 | healthcheck:
|
41 | 41 | test:
|
42 | 42 | - CMD-SHELL
|
43 |
| - - 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}' |
| 43 | + - "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" |
44 | 44 | interval: 5s
|
45 |
| - timeout: 20s |
46 |
| - retries: 10 |
| 45 | + timeout: 10s |
| 46 | + retries: 20 |
47 | 47 | redis:
|
48 |
| - image: 'redis:7.2-alpine' |
49 |
| - restart: unless-stopped |
| 48 | + image: "redis:7.2-alpine" |
50 | 49 | volumes:
|
51 |
| - - 'redis_data:/data' |
| 50 | + - "redis-data:/data" |
52 | 51 | healthcheck:
|
53 | 52 | test:
|
54 | 53 | - CMD
|
55 | 54 | - redis-cli
|
56 | 55 | - PING
|
57 |
| - interval: 30s |
| 56 | + interval: 5s |
58 | 57 | timeout: 10s
|
59 |
| - retries: 5 |
60 |
| -volumes: |
61 |
| - docmost: null |
62 |
| - db_data: null |
63 |
| - redis_data: null |
| 58 | + retries: 20 |
0 commit comments