-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (44 loc) · 1.3 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
# The version of the docker-compose.
version: "3.8"
# Telling docker-compose to build the client and server images and run them in containers.
services:
frontend:
# Telling docker-compose to build the client image using the Dockerfile in the client directory.
build: ./frontend
# Giving the container a name.
container_name: chat_frontend
# Mapping the port 3000 on the host machine to the port 3000 on the container.
ports:
- "3000:3000"
# Mapping the client directory on the host machine to the /app directory on the container.
volumes:
- ./frontend:/app
- /app/node_modules
env_file:
- ./frontend/.env
# Allows you to run container in detached mode.
stdin_open: true
tty: true
backend:
# Telling docker-compose to build the client image using the Dockerfile in the server directory.
build: ./backend
container_name: chat_backend
ports:
- "8080:8080"
volumes:
- ./backend:/app
- /app/node_modules
env_file:
- ./backend/.env
# depends_on:
# - localDB
# localDB:
# image: mongo
# container_name: localDB_mongo
# command: mongod --quiet --logpath /dev/null # Disable logging
# volumes:
# - dbData:/data/db
# ports:
# - 27017:27017
# volumes:
# dbData: