-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
30 lines (25 loc) · 916 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' # specify docker-compose version
# Define the services/containers to be run
services:
angular: # name of the first service
build: frontend # specify the directory of the Dockerfile
container_name: frontend
restart: unless-stopped
ports:
- "4200:4200" # specify port forwarding
express: #name of the second service
build: backend # specify the directory of the Dockerfile
container_name: backend
environment:
- PORT=3000
- MONGO_URL=mongodb://database/crud-db
restart: unless-stopped
ports:
- "3000:3000" #specify ports forwarding
links:
- database
database: # name of the third service
image: mongo # specify image to build container from
container_name: mongo
ports:
- "27017:27017" # specify port forwarding