-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (79 loc) · 2.2 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: gyrinx
services:
postgres:
image: postgres:16.4
container_name: postgres
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4:9
container_name: pgadmin
ports:
- "8001:80"
- "42069:42069"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: pass
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
entrypoint: /bin/sh -c "chmod 600 /pgpass; /entrypoint.sh;"
user: root
volumes:
- pgadmin-data:/var/lib/pgadmin
configs:
- source: servers.json
target: /pgadmin4/servers.json
- source: pgpass
target: /pgpass
depends_on:
postgres:
condition: service_healthy
app:
build: .
ports:
- "8000:8000"
env_file:
- .env
- .env.compose
environment:
PORT: 8000
depends_on:
postgres:
condition: service_healthy
volumes:
- ./gyrinx:/app/gyrinx
- ./data:/app/data
- ./docker:/app/docker
- ./content:/app/content
profiles:
- app
volumes:
pgadmin-data: # To persist postgres connection details
postgres_data:
configs:
pgpass:
content: postgres:5432:*:postgres:postgres
servers.json:
content: |
{"Servers": {"1": {
"Group": "Servers",
"Name": "[email protected]",
"Host": "postgres",
"Port": 5432,
"MaintenanceDB": "postgres",
"Username": "postgres",
"PassFile": "/pgpass",
"SSLMode": "prefer"
}}}