forked from nodeshift-blog-examples/urlshortener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
64 lines (64 loc) · 1.23 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: "3"
services:
front:
image: node:14
ports:
- 3000:3000
volumes:
- ./front:/opt/app:z
command:
- /bin/bash
- -c
- |
cd /opt/app
npm install
npm start
back:
image: node:14
environment:
- PORT=3003
- MONGO_USER=root
- MONGO_PASSWORD=shorties
- MONGO_SERVER=mongo
depends_on:
- mongo
ports:
- 8888:3003
volumes:
- ./back:/opt/app:z
command:
- /bin/bash
- -c
- |
cd /opt/app
npm install
npx nodemon ./bin/www
redirector:
build: ./redirector
environment:
- MONGO_USER=root
- MONGO_PASSWORD=shorties
- MONGO_SERVER=mongo
- MONGO_VERSION=4.4
ports:
- 8080:8080
volumes:
- ./redirector:/var/www/html:z
depends_on:
- mongo
mongo:
image: mongo:4.4
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: shorties
mongo-express:
image: mongo-express:0.54
restart: always
depends_on:
- mongo
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: shorties