-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
services:
db:
image: postgres:17.4
restart: always
environment:
POSTGRES_DB: dashboard
POSTGRES_USER: visionBoard
POSTGRES_PASSWORD: password
ports:
- 5432:5432
volumes:
- visionBoard_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "visionBoard", "-d", "dashboard", "-h", "127.0.0.1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
adminer:
image: adminer
restart: always
depends_on:
db:
condition: service_healthy
ports:
- 8080:8080
healthcheck:
test: ["CMD", "pgrep", "-f", "php"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
schema-dump:
image: postgres:17.4
depends_on:
- db
environment:
POSTGRES_DB: dashboard
POSTGRES_USER: visionBoard
POSTGRES_PASSWORD: password
PGPASSWORD: password # bypass the password prompt
volumes:
- visionBoard_data:/var/lib/postgresql/data
- ./src/database/schema:/schema
entrypoint: >
bash -c "
pg_dump --host=db --username=visionBoard --schema-only --no-owner --dbname=dashboard > /schema/schema.sql &&
chmod 644 /schema/schema.sql
"
volumes:
visionBoard_data: