2022-11-09 07:21:33 +01:00
|
|
|
version: "3.9"
|
2022-09-29 12:09:29 +01:00
|
|
|
|
2022-11-07 16:34:43 +01:00
|
|
|
x-environment: &oncall-environment
|
2022-10-24 14:08:40 +01:00
|
|
|
DATABASE_TYPE: sqlite3
|
|
|
|
|
BROKER_TYPE: redis
|
2022-09-29 12:09:29 +01:00
|
|
|
BASE_URL: $DOMAIN
|
|
|
|
|
SECRET_KEY: $SECRET_KEY
|
|
|
|
|
REDIS_URI: redis://redis:6379/0
|
|
|
|
|
DJANGO_SETTINGS_MODULE: settings.hobby
|
|
|
|
|
CELERY_WORKER_QUEUE: "default,critical,long,slack,telegram,webhook,retry,celery"
|
|
|
|
|
CELERY_WORKER_CONCURRENCY: "1"
|
|
|
|
|
CELERY_WORKER_MAX_TASKS_PER_CHILD: "100"
|
|
|
|
|
CELERY_WORKER_SHUTDOWN_INTERVAL: "65m"
|
|
|
|
|
CELERY_WORKER_BEAT_ENABLED: "True"
|
|
|
|
|
|
2022-06-09 11:17:14 +03:00
|
|
|
services:
|
|
|
|
|
engine:
|
2022-06-14 09:54:41 -06:00
|
|
|
image: grafana/oncall
|
2022-06-17 14:08:09 +03:00
|
|
|
restart: always
|
2022-06-09 15:49:14 +03:00
|
|
|
ports:
|
2022-09-29 12:09:29 +01:00
|
|
|
- "8080:8080"
|
2022-06-09 11:17:14 +03:00
|
|
|
command: >
|
|
|
|
|
sh -c "uwsgi --ini uwsgi.ini"
|
2022-09-29 12:09:29 +01:00
|
|
|
environment: *oncall-environment
|
2022-10-24 14:08:40 +01:00
|
|
|
volumes:
|
|
|
|
|
- oncall_data:/var/lib/oncall
|
2022-06-09 11:17:14 +03:00
|
|
|
depends_on:
|
|
|
|
|
oncall_db_migration:
|
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
redis:
|
2022-10-24 14:08:40 +01:00
|
|
|
condition: service_healthy
|
2022-06-09 11:17:14 +03:00
|
|
|
|
|
|
|
|
celery:
|
2022-06-14 09:54:41 -06:00
|
|
|
image: grafana/oncall
|
2022-06-17 14:08:09 +03:00
|
|
|
restart: always
|
2022-06-09 11:17:14 +03:00
|
|
|
command: sh -c "./celery_with_exporter.sh"
|
2022-09-29 12:09:29 +01:00
|
|
|
environment: *oncall-environment
|
2022-10-24 14:08:40 +01:00
|
|
|
volumes:
|
|
|
|
|
- oncall_data:/var/lib/oncall
|
2022-06-09 11:17:14 +03:00
|
|
|
depends_on:
|
|
|
|
|
oncall_db_migration:
|
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
redis:
|
2022-10-24 14:08:40 +01:00
|
|
|
condition: service_healthy
|
2022-06-09 11:17:14 +03:00
|
|
|
|
|
|
|
|
oncall_db_migration:
|
2022-06-14 09:54:41 -06:00
|
|
|
image: grafana/oncall
|
2022-06-09 11:17:14 +03:00
|
|
|
command: python manage.py migrate --noinput
|
2022-09-29 12:09:29 +01:00
|
|
|
environment: *oncall-environment
|
2022-10-24 14:08:40 +01:00
|
|
|
volumes:
|
|
|
|
|
- oncall_data:/var/lib/oncall
|
2022-06-09 11:17:14 +03:00
|
|
|
depends_on:
|
2022-10-24 14:08:40 +01:00
|
|
|
redis:
|
2022-07-18 11:11:54 +03:00
|
|
|
condition: service_healthy
|
2022-06-09 11:17:14 +03:00
|
|
|
|
|
|
|
|
redis:
|
2022-11-07 16:34:43 +01:00
|
|
|
image: redis:7.0.5
|
2022-06-09 11:17:14 +03:00
|
|
|
restart: always
|
2022-06-20 09:29:37 -06:00
|
|
|
expose:
|
|
|
|
|
- 6379
|
2022-06-09 11:17:14 +03:00
|
|
|
volumes:
|
2022-10-24 14:08:40 +01:00
|
|
|
- redis_data:/data
|
2022-09-29 12:09:29 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
2022-10-24 14:08:40 +01:00
|
|
|
memory: 500m
|
2022-11-07 16:34:43 +01:00
|
|
|
cpus: "0.5"
|
2022-07-18 11:11:54 +03:00
|
|
|
healthcheck:
|
2022-10-24 14:08:40 +01:00
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
timeout: 5s
|
|
|
|
|
interval: 5s
|
|
|
|
|
retries: 10
|
2022-06-09 11:17:14 +03:00
|
|
|
|
|
|
|
|
grafana:
|
2022-06-10 22:58:46 +03:00
|
|
|
image: "grafana/grafana:9.0.0-beta3"
|
2022-06-17 14:08:09 +03:00
|
|
|
restart: always
|
2022-06-09 15:49:14 +03:00
|
|
|
ports:
|
2022-09-29 12:09:29 +01:00
|
|
|
- "3000:3000"
|
2022-06-09 11:17:14 +03:00
|
|
|
environment:
|
|
|
|
|
GF_SECURITY_ADMIN_USER: ${GRAFANA_USER:-admin}
|
2022-09-29 13:06:33 +01:00
|
|
|
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD:-admin}
|
2022-06-09 11:17:14 +03:00
|
|
|
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: grafana-oncall-app
|
|
|
|
|
GF_INSTALL_PLUGINS: grafana-oncall-app
|
2022-10-24 14:08:40 +01:00
|
|
|
volumes:
|
|
|
|
|
- grafana_data:/var/lib/grafana
|
2022-09-29 12:09:29 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 500m
|
2022-11-07 16:34:43 +01:00
|
|
|
cpus: "0.5"
|
2022-06-09 11:17:14 +03:00
|
|
|
profiles:
|
|
|
|
|
- with_grafana
|
|
|
|
|
|
|
|
|
|
volumes:
|
2022-10-24 14:08:40 +01:00
|
|
|
grafana_data:
|
|
|
|
|
oncall_data:
|
|
|
|
|
redis_data:
|