-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
45 lines (38 loc) · 828 Bytes
/
docker-compose.yaml
File metadata and controls
45 lines (38 loc) · 828 Bytes
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
version: "3.7"
services:
api:
container_name: subwayapi
volumes:
- node_modules:/usr/src/node_modules
- ./api/src:/usr/src/
build:
context: ./api/src
dockerfile: ../dev.dockerfile
entrypoint: ["npm", "run", "start:dev"]
env_file:
- .env
ports:
- 3000:3000
- 9229:9229
depends_on:
- postgres
networks:
- app-network
postgres:
container_name: postgres
image: postgres:latest
networks:
- app-network
environment:
POSTGRES_PASSWORD: secret
POSTGRES_USER: root
POSTGRES_DB: db_subway
ports:
- 5432:5432
volumes:
- ./pgdata:/var/lib/postgresql/data
- ./sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
networks:
app-network:
volumes:
node_modules: