-
Notifications
You must be signed in to change notification settings - Fork 51
/
docker-compose.yml
30 lines (28 loc) · 921 Bytes
/
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
version: "3.7" # optional since v1.27.0
services:
#reactApp
slackfrontend:
# image: si3mshady/slackclone-fe:1
build: .
ports:
- "888:3000" #external:internal frontend
depends_on:
- db
nodebackend:
# image: si3mshady/slackclone-be:1
build: server/
ports:
- "9000:9000" #external:internal
depends_on:
- db
#avoid the the Error: connect ECONNREFUSED 127.0.0.1:27017 allows the
#nodeserver to wait until database:port are avail before attempting to connect
db:
volumes:
- /Users/elliottarnold/slack_db:/data/db
image: mongo:latest
ports:
- "27017:27017"
# database connection url via mongoose "mongodb://db:27017/jl";
# netstat -an -ptcp | grep LISTEN check for listening ports
# docker rm $(docker ps -a -q) --force - delete all containers - free up ports for dev environment