-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (41 loc) · 1.05 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
version: '3'
services:
postgres:
image: postgres:latest
restart: always
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: todo
volumes:
- ./init/todo_db.sql:/docker-entrypoint-initdb.d/todo_db.sql
ports:
- '5432:5432'
web-app:
build:
context: ./client
dockerfile: Dockerfile.dev
volumes:
- /app/node_modules
- ./client:/app
ports:
- '3000:3000'
restart: on-failure
container_name: web-app
todo-api:
build:
context: ./server
dockerfile: Dockerfile.dev
ports:
- '4000:4000'
depends_on:
- postgres
restart: on-failure
container_name: todo-api
volumes:
- /app/node_modules # Inside the container, don't try to override this folder, just leave as is
- ./server:/app # Look at the server directory and copy everything into the app folder in the container
environment:
- PORT=4000
- HOST=0.0.0.0
- DATABASE_URL="postgressql://postgres:postgres@postgres:5432/todo"