-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
41 lines (38 loc) · 933 Bytes
/
docker-compose.yml
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
services:
db:
image: postgres:17.2
restart: always
environment:
POSTGRES_DB: dashboard
POSTGRES_USER: visionBoard
POSTGRES_PASSWORD: password
ports:
- 5432:5432
volumes:
- visionBoard_data:/var/lib/postgresql/data
adminer:
image: adminer
restart: always
depends_on:
- db
ports:
- 8080:8080
schema-dump:
image: postgres:17.2
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: