-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
48 lines (44 loc) · 886 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
41
42
43
44
45
46
47
48
version: "3.8"
services:
app:
build:
dockerfile: Dockerfile
context: .
command: sh -c "make dev"
depends_on:
- app_migration
restart: on-failure
volumes:
- type: bind
source: .
target: /app
env_file:
- .env
ports:
- ${PORT}:${PORT}
app_migration:
build:
dockerfile: Dockerfile
context: .
command: sh -c "make migrate"
depends_on:
- postgres
restart: on-failure
env_file:
- .env
postgres:
image: postgres:11
restart: on-failure
ports:
- "1324:5432"
volumes:
- type: volume
source: postgres_volume
target: /var/lib/postgresql/data
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_PORT=${DB_PORT}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
volumes:
postgres_volume: