-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (48 loc) · 1.02 KB
/
docker-compose.yml
File metadata and controls
52 lines (48 loc) · 1.02 KB
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
51
52
version: "3.8"
services:
app:
build:
context: .
dockerfile: Dockerfile
target: development
ports:
- "3000:3000"
depends_on:
db:
condition: service_started
networks:
- assis_network
volumes:
- .:/app
- node_modules:/app/node_modules
env_file:
- .env.example
command: ["npm", "run", "dev"]
db-migrate:
image: migrate/migrate:v4.15.2
volumes:
- ./src/application/database/migrations:/migrations
depends_on:
db:
condition: service_healthy
networks:
- assis_network
db:
image: postgres:15
ports:
- "5432:5432"
env_file:
- .env.example
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U $${DB_USER} -d $${DB_PASSWORD}'"]
interval: 3s
timeout: 3s
retries: 3
networks:
- assis_network
command: ["postgres", "-c", "log_statement=all", "-c", "log_destination=stderr"]
volumes:
node_modules:
networks:
assis_network:
driver: bridge