Advertisement
G0nz0uk

Untitled

Mar 27th, 2024
1,669
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.87 KB | None | 0 0
  1. version: "3.9"
  2.  
  3. x-environment: &oncall-environment
  4.   DATABASE_TYPE: sqlite3
  5.   BROKER_TYPE: redis
  6.   BASE_URL: $DOMAIN
  7.   SECRET_KEY: $SECRET_KEY
  8.   FEATURE_PROMETHEUS_EXPORTER_ENABLED: ${FEATURE_PROMETHEUS_EXPORTER_ENABLED:-false}
  9.   PROMETHEUS_EXPORTER_SECRET: ${PROMETHEUS_EXPORTER_SECRET:-}
  10.   REDIS_URI: redis://redis:6379/0
  11.   DJANGO_SETTINGS_MODULE: settings.hobby
  12.   CELERY_WORKER_QUEUE: "default,critical,long,slack,telegram,webhook,retry,celery,grafana"
  13.   CELERY_WORKER_CONCURRENCY: "1"
  14.   CELERY_WORKER_MAX_TASKS_PER_CHILD: "100"
  15.   CELERY_WORKER_SHUTDOWN_INTERVAL: "65m"
  16.   CELERY_WORKER_BEAT_ENABLED: "True"
  17.   GRAFANA_API_URL: https://my.domain.com:3000
  18.  
  19. services:
  20.   engine:
  21.     image: grafana/oncall
  22.     restart: always
  23.     ports:
  24.      - "8080:8080"
  25.     command: sh -c "uwsgi --ini uwsgi.ini"
  26.     environment: *oncall-environment
  27.     volumes:
  28.      - oncall_data:/var/lib/oncall
  29.     depends_on:
  30.       oncall_db_migration:
  31.         condition: service_completed_successfully
  32.       redis:
  33.         condition: service_healthy
  34.  
  35.   celery:
  36.     image: grafana/oncall
  37.     restart: always
  38.     command: sh -c "./celery_with_exporter.sh"
  39.     environment: *oncall-environment
  40.     volumes:
  41.      - oncall_data:/var/lib/oncall
  42.     depends_on:
  43.       oncall_db_migration:
  44.         condition: service_completed_successfully
  45.       redis:
  46.         condition: service_healthy
  47.  
  48.   oncall_db_migration:
  49.     image: grafana/oncall
  50.     command: python manage.py migrate --noinput
  51.     environment: *oncall-environment
  52.     volumes:
  53.      - oncall_data:/var/lib/oncall
  54.     depends_on:
  55.       redis:
  56.         condition: service_healthy
  57.  
  58.   redis:
  59.     image: redis:7.0.5
  60.     restart: always
  61.     expose:
  62.      - 6379
  63.     volumes:
  64.      - redis_data:/data
  65.     deploy:
  66.       resources:
  67.         limits:
  68.           memory: 500m
  69.           cpus: "0.5"
  70.     healthcheck:
  71.       test: ["CMD", "redis-cli", "ping"]
  72.       timeout: 5s
  73.       interval: 5s
  74.       retries: 10
  75.  
  76. #  prometheus:
  77. #    image: prom/prometheus
  78. #    hostname: prometheus
  79. #    restart: always
  80. #    ports:
  81. #      - "9090:9090"
  82. #    volumes:
  83. #      - ./prometheus.yml:/etc/prometheus/prometheus.yml
  84. #      - prometheus_data:/prometheus
  85. #    profiles:
  86. #      - with_prometheus
  87.  
  88. #  grafana:
  89. #    image: "grafana/${GRAFANA_IMAGE:-grafana:latest}"
  90. #    restart: always
  91. #    ports:
  92. #      - "3000:3000"
  93. #    environment:
  94. #      GF_SECURITY_ADMIN_USER: ${GRAFANA_USER:-admin}
  95. #      GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD:-admin}
  96. #      GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: grafana-oncall-app
  97. #      GF_INSTALL_PLUGINS: grafana-oncall-app
  98. #    volumes:
  99. #      - grafana_data:/var/lib/grafana
  100. #    deploy:
  101. #      resources:
  102. #        limits:
  103. #          memory: 500m
  104. #          cpus: "0.5"
  105. #    profiles:
  106. #      - with_grafana
  107.  
  108. volumes:
  109. #  grafana_data:
  110. #  prometheus_data:
  111.   oncall_data:
  112.  redis_data:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement