|
| 1 | +services: |
| 2 | + |
| 3 | + drill-ui: |
| 4 | + image: ghcr.io/drill4j/drill4j-ui:${DRILL_UI_VERSION} |
| 5 | + environment: |
| 6 | + API_HOST: host.docker.internal |
| 7 | + API_PORT: 8090 |
| 8 | + extra_hosts: |
| 9 | + - "host.docker.internal:host-gateway" |
| 10 | + ports: |
| 11 | + - "8091:8080" |
| 12 | + |
| 13 | + drill-admin: |
| 14 | + image: ghcr.io/drill4j/admin:${DRILL_ADMIN_BACKEND_VERSION} |
| 15 | + environment: |
| 16 | + - DRILL_METRICS_UI_BASE_URL=${DRILL_UI_BASE_URL} |
| 17 | + - DRILL_DB_PORT=5432 |
| 18 | + - DRILL_AGENTS_SOCKET_TIMEOUT=6000 |
| 19 | + - DRILL_DB_HOST=${POSTGRES_HOST} |
| 20 | + - DRILL_DB_NAME=${POSTGRES_DB} |
| 21 | + - DRILL_DB_USER_NAME=${POSTGRES_USER} |
| 22 | + - DRILL_DB_PASSWORD=${POSTGRES_PASSWORD} |
| 23 | + - DRILL_DB_MAX_POOL_SIZE=${DRILL_ADMIN_BACKEND_DB_MAX_POOL_SIZE} |
| 24 | + - LOG_LEVEL=info |
| 25 | + healthcheck: |
| 26 | + test: [ "CMD", "curl", "http://localhost:8090" ] |
| 27 | + interval: 10s |
| 28 | + timeout: 3s |
| 29 | + retries: 30 |
| 30 | + logging: |
| 31 | + driver: "json-file" |
| 32 | + options: |
| 33 | + max-size: "10m" |
| 34 | + max-file: "5" |
| 35 | + ports: |
| 36 | + - 8090:8090 |
| 37 | + depends_on: |
| 38 | + postgres: |
| 39 | + condition: service_healthy |
| 40 | + |
| 41 | + postgres: |
| 42 | + image: postgres:17.0 |
| 43 | + shm_size: 1g |
| 44 | + ports: |
| 45 | + - '5432:5432' |
| 46 | + environment: |
| 47 | + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} |
| 48 | + POSTGRES_USER: ${POSTGRES_USER} |
| 49 | + POSTGRES_DB: ${POSTGRES_DB} |
| 50 | + volumes: |
| 51 | + # Volume to initialize Metabase dashboards |
| 52 | + # Place data.sql file from the https://github.com/Drill4J/drill-metabase-dashboards/releases to db-init directory |
| 53 | + - ./db-init:/docker-entrypoint-initdb.d |
| 54 | + # Volume to store application metrics |
| 55 | + - drill-data-pg:/var/lib/postgresql/data |
| 56 | + healthcheck: |
| 57 | + test: ['CMD-SHELL', 'pg_isready -U postgres'] |
| 58 | + interval: 10s |
| 59 | + timeout: 5s |
| 60 | + retries: 5 |
| 61 | + logging: |
| 62 | + driver: "json-file" |
| 63 | + options: |
| 64 | + max-size: "10m" |
| 65 | + max-file: "5" |
| 66 | + command: ["postgres", "-c", "log_statement=all", "-c", "log_min_duration_statement=0"] |
| 67 | + |
| 68 | + # This container launches script to either create or update Metabase dashboards |
| 69 | + # WARNING: it removes all previously created Metabase dashboards and users |
| 70 | + # comment this out if you'd like to keep your edits / customizations |
| 71 | + drill-metabase-dashboards-migration: |
| 72 | + image: ghcr.io/drill4j/drill-metabase-dashboards:${DRILL_METABASE_DASHBOARDS_VERSION} |
| 73 | + environment: |
| 74 | + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} |
| 75 | + POSTGRES_HOST: postgres |
| 76 | + POSTGRES_PORT: 5432 |
| 77 | + POSTGRES_USER: ${POSTGRES_USER} |
| 78 | + POSTGRES_DB: ${METABASE_POSTGRES_DB} # its preferable to specify DB different from where Drill4J data is stored. E.g. db-metabase |
| 79 | + extra_hosts: |
| 80 | + - "host.docker.internal:host-gateway" |
| 81 | + depends_on: |
| 82 | + postgres: |
| 83 | + condition: service_healthy |
| 84 | + |
| 85 | + metabase: |
| 86 | + image: metabase/metabase:v0.53.7.x |
| 87 | + container_name: metabase |
| 88 | + hostname: metabase |
| 89 | + volumes: |
| 90 | + # Required to share urandom from host machine to speedup startup (see https://github.com/metabase/metabase/issues/10175, https://ruleoftech.com/2016/avoiding-jvm-delays-caused-by-random-number-generation) |
| 91 | + - /dev/urandom:/dev/random:ro |
| 92 | + ports: |
| 93 | + - 8095:3000 |
| 94 | + environment: |
| 95 | + MB_DB_TYPE: postgres |
| 96 | + MB_DB_HOST: postgres |
| 97 | + MB_DB_PORT: 5432 |
| 98 | + MB_DB_USER: ${POSTGRES_USER} |
| 99 | + MB_DB_PASS: ${POSTGRES_PASSWORD} |
| 100 | + MB_DB_DBNAME: ${METABASE_POSTGRES_DB} |
| 101 | + healthcheck: |
| 102 | + test: curl --fail -I http://localhost:3000/api/health || exit 1 |
| 103 | + interval: 15s |
| 104 | + timeout: 5s |
| 105 | + retries: 5 |
| 106 | + depends_on: |
| 107 | + drill-metabase-dashboards-migration: |
| 108 | + condition: service_completed_successfully |
| 109 | + |
| 110 | +volumes: |
| 111 | + drill-data-pg: |
0 commit comments