2022-09-29 12:09:29 +01:00
|
|
|
version: "3.8"
|
2022-08-08 15:30:56 -03:00
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:14.4
|
|
|
|
|
restart: always
|
|
|
|
|
ports:
|
2022-09-29 12:09:29 +01:00
|
|
|
- "5432:5432"
|
2022-08-08 15:30:56 -03:00
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: oncall_local_dev
|
|
|
|
|
POSTGRES_PASSWORD: empty
|
2022-09-29 12:09:29 +01:00
|
|
|
POSTGRES_INITDB_ARGS: --encoding=UTF-8
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 500m
|
|
|
|
|
cpus: '0.5'
|
2022-11-02 01:07:18 -03:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "pg_isready", "-U", "postgres"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
2022-08-08 15:30:56 -03:00
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: redis
|
|
|
|
|
restart: always
|
|
|
|
|
ports:
|
2022-09-29 12:09:29 +01:00
|
|
|
- "6379:6379"
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 100m
|
|
|
|
|
cpus: '0.1'
|
2022-08-08 15:30:56 -03:00
|
|
|
|
|
|
|
|
rabbit:
|
|
|
|
|
image: "rabbitmq:3.7.15-management"
|
|
|
|
|
environment:
|
|
|
|
|
RABBITMQ_DEFAULT_USER: "rabbitmq"
|
|
|
|
|
RABBITMQ_DEFAULT_PASS: "rabbitmq"
|
|
|
|
|
RABBITMQ_DEFAULT_VHOST: "/"
|
2022-09-29 12:09:29 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 1000m
|
|
|
|
|
cpus: '0.5'
|
2022-08-08 15:30:56 -03:00
|
|
|
ports:
|
2022-09-29 12:09:29 +01:00
|
|
|
- "15672:15672"
|
|
|
|
|
- "5672:5672"
|
2022-08-08 15:30:56 -03:00
|
|
|
|
2022-11-02 01:07:18 -03:00
|
|
|
postgres_to_create_grafana_db:
|
|
|
|
|
image: postgres:14.4
|
|
|
|
|
command: bash -c "PGPASSWORD=empty psql -U postgres -h postgres -tc \"SELECT 1 FROM pg_database WHERE datname = 'grafana'\" | grep -q 1 || PGPASSWORD=empty psql -U postgres -h postgres -c \"CREATE DATABASE grafana\""
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
2022-08-08 15:30:56 -03:00
|
|
|
|
|
|
|
|
grafana:
|
2022-08-17 09:41:49 -06:00
|
|
|
image: "grafana/grafana:main"
|
2022-08-08 15:30:56 -03:00
|
|
|
restart: always
|
|
|
|
|
environment:
|
2022-11-02 01:07:18 -03:00
|
|
|
GF_DATABASE_TYPE: postgres
|
|
|
|
|
GF_DATABASE_HOST: postgres:5432
|
|
|
|
|
GF_DATABASE_NAME: grafana
|
|
|
|
|
GF_DATABASE_USER: postgres
|
2022-08-08 15:30:56 -03:00
|
|
|
GF_DATABASE_PASSWORD: empty
|
2022-11-02 01:07:18 -03:00
|
|
|
GF_DATABASE_SSL_MODE: disable
|
|
|
|
|
GF_SECURITY_ADMIN_USER: ${GRAFANA_USER:-admin}
|
|
|
|
|
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD:-admin}
|
2022-08-08 15:30:56 -03:00
|
|
|
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: grafana-oncall-app
|
2022-11-02 01:07:18 -03:00
|
|
|
GF_INSTALL_PLUGINS: grafana-oncall-app
|
2022-09-29 12:09:29 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 500m
|
|
|
|
|
cpus: '0.5'
|
2022-08-08 15:30:56 -03:00
|
|
|
volumes:
|
|
|
|
|
- ./grafana-plugin:/var/lib/grafana/plugins/grafana-plugin
|
|
|
|
|
ports:
|
2022-09-29 12:09:29 +01:00
|
|
|
- "3000:3000"
|
2022-08-08 15:30:56 -03:00
|
|
|
depends_on:
|
2022-11-02 01:07:18 -03:00
|
|
|
postgres_to_create_grafana_db:
|
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
postgres:
|
2022-08-08 15:30:56 -03:00
|
|
|
condition: service_healthy
|