-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
46 lines (42 loc) · 964 Bytes
/
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
version: "3.3"
services:
banks-db:
image: postgres:15.1
environment:
POSTGRES_DB: banks
POSTGRES_USER: user
POSTGRES_PASSWORD: password
PGDATA: "/var/lib/postgresql/data/pgdata"
PGPORT: 5432
container_name: 'banks-postgres-container'
ports:
- '5432:5432'
volumes:
- .:/var/lib/postgresql/data/banks
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U user -d banks" ]
interval: 1s
timeout: 5s
retries: 5
migrations-banks:
build:
context: ./migration
dockerfile: Dockerfile
container_name: migrations-banks
depends_on:
banks-db:
condition: service_healthy
volumes:
- ./migration:/migration:rw
banks-api:
image: banks
build: ./
ports:
- "8080:8080"
- "8081:8081"
depends_on:
- migrations-banks
restart: unless-stopped
volumes:
- ./data:/data:rw