generated from osamhack2021/Repo_Sample-Technology_ProjectName_TeamName
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.dev.yml
71 lines (65 loc) · 1.58 KB
/
docker-compose.dev.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: "3.9"
services:
# MongoDB
mongodb:
image: mongo:latest
container_name: db
command: mongod --quiet --logpath /dev/null # disable mongodb verbose logging
# restart: unless-stopped
env_file: ./.env
volumes:
- db:/data/db
networks:
- backend
# Express.js Server
backend:
container_name: back
# command: tail -f /dev/null # DEBUG: uncomment to keep container running
depends_on:
- mongodb
build:
dockerfile: Dockerfile.dev # DEV: uses separate Dockerfile for development environment
context: ./backend
# restart: unless-stopped
env_file: ./.env
volumes:
- ./backend:/app/backend
networks:
- backend
- frontend
# React.js App Client
frontend:
container_name: front
# command: tail -f /dev/null # DEBUG: uncomment to keep container running
depends_on:
- backend
build:
dockerfile: Dockerfile.dev # DEV: uses separate Dockerfile for development environment
context: ./frontend
args:
- REACT_APP_API_BASE_URL=$API_BASE_URL
volumes:
- ./frontend:/app/frontend
networks:
- frontend
# Nginx Reserse Proxy
nginx:
image: nginx:alpine
container_name: nginx
# command: tail -f /dev/null # DEBUG: uncomment to keep container running
depends_on:
- frontend
ports:
- 80:80
- 443:443 # TODO: Add SSL support
volumes:
- ./nginx/config:/etc/nginx
- ./nginx/certs:/etc/ssl/private
networks:
- backend
- frontend
volumes:
db:
networks:
backend:
frontend: