-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (44 loc) · 1.04 KB
/
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
41
42
43
44
45
46
47
48
49
50
services:
app:
build: ./
container_name: bash_service
ports:
- ${PORT}:${PORT}
depends_on:
postgres:
condition: service_healthy
networks:
- bash
postgres:
image: postgres:16
container_name: postgres_bash
environment:
POSTGRES_DB: ${POSTGRES_DBNAME}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d postgres -U yks" ]
interval: 3s
timeout: 5s
retries: 10
volumes:
- ./data:/var/lib/postgresql/data
networks:
bash:
aliases:
- database
migrate:
image: migrate/migrate
container_name: bash_migrate
volumes:
- ./migrations:/migrations
command: ["-path", "./migrations", "-database", "postgres://yks:yksadm@database:5432/postgres?sslmode=disable", "up" ]
depends_on:
postgres:
condition: service_healthy
networks:
- bash
networks:
bash: