-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.1 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
version: "3"
services:
redis_db:
image: redis
ports:
- 6379:6379
environment:
- REDIS_PASSWORD=REDIS-PASSWORD
command: redis-server --requirepass REDIS-PASSWORD
restart: always
backend:
build: ./backend
environment:
# Flask Variables
- SECRET_KEY=YOUR-SECRET-KEY
# Flask Ratelimit
- RATELIMIT_ENABLED=True
- RATELIMIT_STORAGE_URI=redis://:REDIS-PASSWORD@redis_db:6379/0
# Flask Cache
- CACHE_ENABLED=True
- CACHE_TYPE=RedisCache
- CACHE_STORAGE_URL=redis://:REDIS-PASSWORD@redis_db:6379/1
command: gunicorn --bind 0.0.0.0:5000 server:app
ports:
- "5000:5000"
volumes:
- "./backend:/app/backend"
depends_on:
- redis_db
restart: always
frontend:
build: ./frontend
command: npm start
ports:
- "3000:3000"
volumes:
- "./frontend:/app/frontend"
restart: always
nginx:
image: nginx:stable-alpine
ports:
- 80:80
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- backend
- frontend
restart: always