-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (82 loc) · 2.03 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
version: "3.8"
services:
app-logger:
restart: always
build:
context: .
dockerfile: Dockerfile
container_name: app-logger
networks:
- cranecloud
- default
environment:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
MONGO_URI: ${MONGO_URI:-mongodb://crane-logger:password@logger-mongo-db:27017/admin}
REDIS_URL: ${REDIS_URL:-redis://logger-redis-db:6379}
JWT_SALT: ${JWT_SALT:-salt}
ports:
- "${APP_PORT:-8000}:8000"
volumes:
- .:/app
depends_on:
- logger-mongo-db
links:
- logger-mongo-db
logger-celery-worker:
restart: always
build:
context: .
dockerfile: Dockerfile
container_name: logger-celery-worker
command: poetry run celery -A main.celery worker --loglevel=info
environment:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
MONGO_URI: ${MONGO_URI:-mongodb://crane-logger:password@logger-mongo-db:27017/admin}
REDIS_URL: ${REDIS_URL:-redis://logger-redis-db:6379}
JWT_SALT: ${JWT_SALT:-salt}
ports:
- "${CELERY_APP_PORT:-8500}:8000"
volumes:
- .:/celery-app
depends_on:
- logger-mongo-db
- logger-redis-db
links:
- logger-mongo-db
- logger-redis-db
logger-mongo-db:
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: crane-logger
MONGO_INITDB_ROOT_PASSWORD: password
MONGODB_DATA_DIR: /data/db
ports:
- "${MONGO_PORT:-27011}:27017"
volumes:
- logger-mongo-data:/data/db
logger-redis-db:
image: redis:latest
container_name: logger-redis-db
ports:
- "6380:6379"
volumes:
- loggerredisdbdata:/data
# Celery dashboard
logger-flower:
image: mher/flower
ports:
- "5555:5555"
environment:
- CELERY_BROKER_URL=redis://logger-redis-db:6379/0
depends_on:
- logger-redis-db
volumes:
logger-mongo-data:
loggerredisdbdata:
networks:
cranecloud:
external: true
name: cranecloud_default