forked from Igorxp5/stackprior
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
103 lines (99 loc) · 2.34 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: '3'
services:
nginx:
container_name: stackprior-nginx
image: nginx:latest
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- proxies
- back-end
expose:
- 80
depends_on:
- shopping-cart
platform:
container_name: stackprior-platform
build:
context: ./client
volumes:
- ./client:/app
ports:
- 8081:3000
depends_on:
- api
api:
container_name: stackprior-api
build:
context: ./api
volumes:
- ./api:/api
- ./config:/config
- /var/run/docker.sock:/var/run/docker.sock
environment:
PORT: 8080
NGINX_CONFIG_FILE: /config/nginx.conf
NGINX_CONTAINER_NAME: stackprior-nginx
MQUEUE_CONFIG_FILE: /config/mqueue.json
DOCKER_UNIX_SOCKET: /var/run/docker.sock
ports:
- 8080:8080
depends_on:
- nginx
mqueue:
container_name: stackprior-mqueue
build:
context: ./mqueue
command: python __init__.py -r /config/mqueue.json nginx 80 0.0.0.0 80 -m ${MEMORY_THRESHOLD} -c ${CPU_THRESHOLD}
volumes:
- ./mqueue:/mqueue:ro
- ./config:/config
ports:
- 80:80
networks:
- proxies
mongo-express:
image: mongo-express
expose:
- 8081
environment:
ME_CONFIG_BASICAUTH_USERNAME: ${MONGO_EXPRESS_USER}
ME_CONFIG_BASICAUTH_PASSWORD: ${MONGO_EXPRESS_PASS}
ME_CONFIG_MONGODB_SERVER: shopping-cart-mongo
ME_CONFIG_MONGODB_ADMINUSERNAME: ${DB_USER}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${DB_PASS}
networks:
- back-end
- shopping-cart
depends_on:
- shopping-cart-mongo
shopping-cart-mongo:
image: mongo:latest
volumes:
- ./data/shopping-cart-db:/data/db
logging:
driver: none
environment:
MONGO_INITDB_ROOT_USERNAME: ${DB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASS}
networks:
- shopping-cart
shopping-cart:
container_name: shopping-cart
image: igorxp5/shopping-cart-rest-api:latest
environment:
MONGODB_URI: mongodb://${DB_USER}:${DB_PASS}@shopping-cart-mongo
networks:
- shopping-cart
- back-end
expose:
- 3000
depends_on:
- shopping-cart-mongo
networks:
proxies:
driver: bridge
back-end:
driver: bridge
shopping-cart:
driver: bridge