* add docker-compose-tiny.yml * rename docker compose files, add info on tiny setup to readme * add link to mysql-rabbitmq * typo * docker-compose-sqlite-redis.yml -> docker-compose.yml
98 lines
2.3 KiB
YAML
98 lines
2.3 KiB
YAML
version: "3.8"
|
|
|
|
x-environment:
|
|
&oncall-environment
|
|
DATABASE_TYPE: sqlite3
|
|
BROKER_TYPE: redis
|
|
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"
|
|
|
|
services:
|
|
engine:
|
|
image: grafana/oncall
|
|
restart: always
|
|
ports:
|
|
- "8080:8080"
|
|
command: >
|
|
sh -c "uwsgi --ini uwsgi.ini"
|
|
environment: *oncall-environment
|
|
volumes:
|
|
- oncall_data:/var/lib/oncall
|
|
depends_on:
|
|
oncall_db_migration:
|
|
condition: service_completed_successfully
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
celery:
|
|
image: grafana/oncall
|
|
restart: always
|
|
command: sh -c "./celery_with_exporter.sh"
|
|
environment: *oncall-environment
|
|
volumes:
|
|
- oncall_data:/var/lib/oncall
|
|
depends_on:
|
|
oncall_db_migration:
|
|
condition: service_completed_successfully
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
oncall_db_migration:
|
|
image: grafana/oncall
|
|
command: python manage.py migrate --noinput
|
|
environment: *oncall-environment
|
|
volumes:
|
|
- oncall_data:/var/lib/oncall
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
redis:
|
|
image: redis
|
|
restart: always
|
|
expose:
|
|
- 6379
|
|
volumes:
|
|
- redis_data:/data
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 500m
|
|
cpus: '0.5'
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
timeout: 5s
|
|
interval: 5s
|
|
retries: 10
|
|
|
|
grafana:
|
|
image: "grafana/grafana:9.0.0-beta3"
|
|
restart: always
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
GF_SECURITY_ADMIN_USER: ${GRAFANA_USER:-admin}
|
|
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD:-admin}
|
|
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: grafana-oncall-app
|
|
GF_INSTALL_PLUGINS: grafana-oncall-app
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 500m
|
|
cpus: '0.5'
|
|
profiles:
|
|
- with_grafana
|
|
|
|
volumes:
|
|
grafana_data:
|
|
oncall_data:
|
|
redis_data:
|