forked from aadeshkulkarni/figuringout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (52 loc) · 1.16 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
51
52
53
54
55
56
version: "0.1"
#project services setup design
services:
#frontend service image setup
frontend:
container_name: client
build:
context: ./frontend
dockerfile: Dockerfile
image: medium-app-frontend:latest
restart: unless-stopped
ports:
- "80:80"
networks:
- medium-app
depends_on:
- backend
volumes:
- ./frontend:/app #mount local frontend directory to container
command: npm run start
backend:
#backend service image setup
container_name: server
build:
context: ./backend
dockerfile: Dockerfile
image: medium-app-backend:latest
restart: unless-stopped
ports:
- "8787:8787"
networks:
- medium-app
volumes:
- ./backend:/app #mount local backend directory to container
command: npm run dev
# local postgress setup.
postgres:
container_name: postgres
image: postgres:latest
restart: unless-stopped
environment:
POSTGRES_DB: medium-app
POSTGRES_USER: root
POSTGRES_PASSWORD: medium123
ports:
- "5432:5432"
networks:
- medium-app
#network connection
networks:
medium-app:
driver: bridge