-
Notifications
You must be signed in to change notification settings - Fork 1
/
composedockerhub.txt
74 lines (56 loc) · 1.19 KB
/
composedockerhub.txt
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.8'
services:
frontend:
image: jimsonxd/front-end:v5
ports:
- 3000:3000
networks:
- team3network
backend:
image: jimsonxd/back-end:v1
ports:
- 8080:8080
depends_on:
- mongodb
networks:
- team3network
mongodb:
image: mongo:6
volumes:
- database:/data/db
ports:
- 27018:27017
networks:
- team3network
volumes:
database:
networks:
team3network:
-------------------------------------------------------
Commands:
docker-compose up -d
docker-compose down
--------------------------------------------------------
Note: run the docker compose.yml in the path where the compose.yml is
Example: jimson@Jimsons-MacBook-Pro MRL5_Mission5 % docker-compose up -d
--------------------------------------------------------
version: '3.8'
services:
frontend:
image: <dockerhub-username>/mrl5_mission5-frontend:latest
ports:
- 3000:3000
backend:
image: <username>/mrl5_mission5-backend:latest
ports:
- 8080:8080
depends_on:
- mongodb
mongodb:
image: mongo:6
volumes:
- database:/data/db
ports:
- 27018:27017
volumes:
database: