-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
47 lines (45 loc) · 1 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
version: "3.4"
services:
app:
build: .
container_name: api
ports:
- 8080:8080
environment:
"SWAGGER_HOST": 0.0.0.0:8080
"HTTP_PORT": 8080
"HTTP_SHUTDOWN_TIMEOUT": 1s
"HTTP_READ_TIMEOUT": 30s
"HTTP_WRITE_TIMEOUT": 30s
"DB_HOST": postgres
"DB_NAME": bank
"DB_PORT": 5432
"DB_USER": postgres
"DB_PASS": postgres
"JWT_ACCESS_KEY": stone
"JWT_ACCESS_DURATION": 60m
volumes:
- .:/go/src/
depends_on:
postgres:
condition: service_healthy
postgres:
image: "postgres:12-alpine"
restart: unless-stopped
command: ["postgres", "-c", "log_statement=all"]
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: bank
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5432:5432"
volumes:
db:
driver: local