-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (73 loc) · 1.58 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
services:
backend:
build: "./cloudleak_backend"
env_file:
- ".env"
ports:
- 5000:5000
deploy:
resources:
limits:
cpus: "${DOCKER_BACKEND_CPUS:-0}"
memory: "${DOCKER_BACKEND_MEMORY:-0}"
depends_on:
- redis
- mongo
redis:
image: redis:alpine
ports:
- 6379:6379
volumes:
- "redis:/data"
deploy:
resources:
limits:
cpus: "${DOCKER_REDIS_CPUS:-0}"
memory: "${DOCKER_REDIS_MEMORY:-0}"
mongo:
image: mongo:latest
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: cloudleak
MONDODB_LOG_DIR: /dev/null
frontend:
build: "./cloudleak_frontend"
ports:
- 8080:80
deploy:
resources:
limits:
cpus: "${DOCKER_FRONTEND_CPUS:-0}"
memory: "${DOCKER_FRONTEND_MEMORY:-0}"
depends_on:
- backend
- mongo
worker:
build:
context: "./cloudleak_backend"
target: "app"
command: celery -A "cloudleak.app.celery_app" worker -l INFO
depends_on:
- redis
- backend
- mongo
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
env_file:
- ".env"
deploy:
resources:
limits:
cpus: "${DOCKER_WORKER_CPUS:-0}"
memory: "${DOCKER_WORKER_MEMORY:-0}"
volumes:
- "data:/data"
- "db:/db"
volumes:
redis: {}
db: {}
data: {}