-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yaml
46 lines (43 loc) · 981 Bytes
/
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
services:
postgres:
image: postgres:17.4-alpine3.21
container_name: xpay_postgres
environment:
POSTGRES_DB: xpay
POSTGRES_USER: ash
POSTGRES_PASSWORD: samplepass
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ash -d xpay"]
interval: 10s
timeout: 5s
retries: 3
networks:
- xpay_network
api:
build:
context: .
dockerfile: Dockerfile
container_name: xpay_api
environment:
DB_URL: "postgres://ash:samplepass@postgres:5432/xpay?sslmode=disable&timezone=UTC"
SERVER_ADDRESS: "0.0.0.0:8080"
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
networks:
- xpay_network
volumes:
pg_data:
name: xpay_pg_data
networks:
xpay_network:
name: xpay_network
driver: bridge