forked from utmgdsc/PollVotingSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
89 lines (84 loc) · 1.57 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
version: "3.8"
services:
caching:
image: redis
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
networks:
backend:
aliases:
- redis
volumes:
- RedisVolume:/data
command: redis-server --appendonly yes --requirepass password
mongodb:
container_name: mongo
image: mongo:4.4
restart: unless-stopped
environment:
- MONGO_INITDB_DATABASE=quiz
- TZ=America/New_York
ports:
- "27018:27017"
networks:
backend:
aliases:
- mongo
volumes:
- MongodbVolume:/data/db
voteapi:
container_name: voteapi
build:
context: ./server
dockerfile: Dockerfile
restart: unless-stopped
networks:
backend:
aliases:
- voteapi
depends_on:
- mongodb
- caching
ports:
- "5001:5001"
env_file:
- ./server/.env
environment:
- TZ=America/New_York
frontend:
container_name: frontend
restart: unless-stopped
build:
context: ./client
dockerfile: Dockerfile
depends_on:
- voteapi
networks:
backend:
aliases:
- frontend
ports:
- "3001:3001"
env_file:
- ./client/.env
nginx-proxy:
container_name: nginx
image: nginx
restart: unless-stopped
depends_on:
- frontend
networks:
backend:
aliases:
- nginx
ports:
- "5000:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
volumes:
RedisVolume:
MongodbVolume:
networks:
backend: