This repository was archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.yaml
More file actions
112 lines (105 loc) · 3.17 KB
/
compose.yaml
File metadata and controls
112 lines (105 loc) · 3.17 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
services:
simod-http:
image: nokal/simod-http:0.13.16
build:
context: .
dockerfile: http.dockerfile
depends_on:
- mongo
- simod-http-worker
volumes:
- /tmp/simod:/tmp/simod
env_file:
- .simod-http.env.dev # Docker Compose has a bug that cannot read hashed from "environment", thus, we use "env_file" instead
command: uvicorn simod_http.main:api --host=0.0.0.0 --port=8000 --workers=4 --log-level=info --proxy-headers --root-path=/api/v1
restart: unless-stopped
simod-http-worker:
image: nokal/simod-http-worker:0.13.16
depends_on:
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
build:
context: .
dockerfile: worker.dockerfile
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- SIMOD_MONGO_URL=mongodb://mongo:27017
- SIMOD_MONGO_DATABASE=simod
- SIMOD_MONGO_COLLECTION=discoveries
- SIMOD_STORAGE_DISCOVERY_EXPIRATION_TIMEDELTA=60
volumes:
- /tmp/simod:/tmp/simod
command: celery --app simod_http.worker worker --loglevel info --concurrency=2 --autoscale=2,1 --events --hostname simod-http-worker
restart: unless-stopped
simod-http-scheduler:
image: nokal/simod-http-scheduler:0.13.16
depends_on:
- simod-http
- simod-http-worker
build:
context: .
dockerfile: scheduler.dockerfile
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- SIMOD_STORAGE_CLEANING_TIMEDELTA=60
- SIMOD_STORAGE_DISCOVERY_EXPIRATION_TIMEDELTA=60
volumes:
- /tmp/simod:/tmp/simod
command: python simod_http/scheduler.py
restart: unless-stopped
mongo:
image: mongo:6.0.5-jammy
ports:
- 27017:27017
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=example
restart: unless-stopped
flower:
image: mher/flower:2.0
depends_on:
rabbitmq:
condition: service_healthy
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- CELERY_RESULT_BACKEND=amqp://guest:guest@rabbitmq:5672//
command: celery --broker amqp://guest:guest@rabbitmq:5672// flower --port=5555 --basic_auth=admin:admin --persistent=True --url_prefix=flower
restart: unless-stopped
redis:
image: redis:6.0-alpine
ports:
- 6379:6379
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 3
rabbitmq:
image: rabbitmq:3.11-management-alpine
ports:
- 5672:5672
- 15672:15672
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
restart: unless-stopped
healthcheck:
test: [ "CMD", "rabbitmqctl", "status" ]
interval: 5s
timeout: 5s
retries: 3
nginx:
image: nginx:stable
ports:
- 8000:80
volumes:
- ./ansible/nginx.conf:/etc/nginx/nginx.conf:ro
- ./ansible/htpasswd:/etc/nginx/htpasswd:ro
depends_on:
- simod-http
restart: unless-stopped