-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
74 lines (69 loc) · 1.97 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
# This is the development stack for MGKDB Web.
# This architecrure will need to be replicated and slightly modified for production use on Rancher
# Containers:
# app - Contains the main application code
# db - MySQL database for App users and Redis tasks
# redis - Redis queue server for tasking
# worker - Redis worker container running modified app image
# Volumes:
# app - Used to mirror application code to container for dev purposes,
# The source is defined manually as ./App while the other two are handled by Docker
# db-data - Used to persist mysql db data, linked to both app and worker
# downloads - Used to store downloaded files, needs to be periodically cleaned
# linked to both app and worker
version: '3'
services:
app:
container_name: app
image: mgkdb:latest
volumes:
- ./App:/app/
- downloads:/downloads/
ports:
- "5000:5000"
links:
- mysql:dbserver
mysql:
container_name: db
image: mysql:latest
volumes:
- db-data:/var/lib/mysql
env_file: DB/.env-mysql
cap_add:
- SYS_NICE
redis:
container_name: redis
image: redis:latest
ports:
- "6379:6379"
worker:
container_name: worker
image: mgkdb:worker
volumes:
- ./App:/app/
- downloads:/downloads/
links:
- mysql:dbserver
- redis:redis-server
depends_on:
- redis
dashboard:
image: dashboard:latest
container_name: dashboard
ports:
- 9181:9181
command: rq-dashboard -H redis
depends_on:
- redis
#Docker-handled volumes
volumes:
db-data:
downloads:
#Nginx for production
# nginx:
# container_name: nginx
# image: nginx:latest
# ports:
# - 1337:8081
# depends_on:
# - app