forked from formancehq/payments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (38 loc) · 928 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
version: '3.8'
volumes:
postgres:
services:
postgres:
image: "postgres:14-alpine"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U payments"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
environment:
POSTGRES_USER: "payments"
POSTGRES_PASSWORD: "payments"
POSTGRES_DB: "payments"
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
payments:
image: golang:1.19.3-alpine3.16
command: go run ./ migrate up && go run ./ server
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:8080/_healthcheck" ]
interval: 10s
timeout: 5s
retries: 5
depends_on:
- postgres
ports:
- "8080:8080"
volumes:
- .:/app
working_dir: /app
environment:
DEBUG: ${DEBUG:-"true"}
POSTGRES_URI: postgres://payments:payments@postgres/payments?sslmode=disable