-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
67 lines (64 loc) · 1.44 KB
/
docker-compose.yaml
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
services:
bab:
build:
context: .
restart: unless-stopped
init: true
environment:
DATABASE_URL: postgresql://postgres:${DB_PASSWORD:?error}@database:5432/postgres?schema=bab
configs:
- source: local-json
target: /app/config/local.json
volumes:
- logs:/app/logs
depends_on:
database:
required: true
condition: service_healthy
restart: true
ports:
- "8080:80"
database:
image: postgres:17.4-alpine3.21
restart: unless-stopped
init: true
volumes:
- database:/var/lib/postgresql/data
environment:
# Network is isolated, who cares
POSTGRES_PASSWORD: ${DB_PASSWORD:?error}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
ports:
- "127.0.0.1:15432:5432"
volumes:
logs:
database:
configs:
local-json:
content: |
{
"server": {
"publicUrl": "http://localhost:8080",
"host": "0.0.0.0",
"proxy": false
},
"database": {
"connectionString": "postgresql://postgres:${DB_PASSWORD:?error}@database:5432/postgres?schema=bab"
},
"logging": {
"http": {
"meta": false
},
"file": {
"enabled": true
},
"file-err": {
"enabled": true
}
}
}