-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
52 lines (47 loc) · 968 Bytes
/
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
services:
votingdb:
image: postgres
container_name: votingdb
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: votingdb
ports:
- "5432:5432"
volumes:
- votingdb_data:/var/lib/postgresql/data
restart: always
redis:
image: redis
container_name: redis
ports:
- "6379:6379"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
volumes:
- redis_data:/data
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
restart: always
backend:
depends_on:
- redis
- votingdb
env_file:
- ./voting-backend/.env
build:
context: ./voting-backend
ports:
- "4000:4000"
restart: always
frontend:
depends_on:
- backend
env_file:
- ./voting-frontend/.env
build:
context: ./voting-frontend
ports:
- "3000:3000"
restart: always
volumes:
votingdb_data:
redis_data: