-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
42 lines (41 loc) · 922 Bytes
/
docker-compose.yaml
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
services:
backend:
container_name: Express
build: ./backend
depends_on:
- mongo
restart: unless-stopped
env_file:
- ./.env
ports:
- "${BACKEND_LOCAL_PORT}:${BACKEND_DOCKER_PORT}"
stdin_open: true
tty: true
volumes:
- ./backend:/backend
frontend:
container_name: React
build: ./frontend
env_file:
- ./.env
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
environment:
- NODE_ENV=${NODE_ENV}
volumes:
- ./frontend:/frontend
mongo:
container_name: Mongo
image: mongo:latest
restart: unless-stopped
env_file: ./.env
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGODB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_PASSWORD}
- MONGO_INITDB_DATABASE=${MONGODB_NAME}
ports:
- "${MONGODB_LOCAL_PORT}:${MONGODB_DOCKER_PORT}"
volumes:
- db:/data/db
volumes:
db: