-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 960 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (42 loc) · 960 Bytes
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
services:
app:
build:
context: .
dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
environment:
APP_ENV: development
HTTP_PORT: 8080
DB_HOST: postgres
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: srtp
DB_SSLMODE: disable
DB_TIMEZONE: Asia/Shanghai
DB_MAX_IDLE_CONNS: 10
DB_MAX_OPEN_CONNS: 50
DB_CONN_MAX_LIFETIME_MIN: 30
DB_CONN_MAX_IDLE_TIME_MIN: 10
LOG_LEVEL: info
ports:
- "8080:8080"
postgres:
image: postgres:17-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: srtp
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d srtp"]
interval: 5s
timeout: 5s
retries: 10
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: