This commit is contained in:
2025-10-12 18:20:29 +02:00
parent 51563e2dcd
commit 3ac174ed2b
5 changed files with 325 additions and 44 deletions

View File

@@ -11,7 +11,7 @@ services:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:Z
- ./data:/tmp:z
ports:
- 5432:5432
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "--username", "${COMPOSE_PROJECT_NAME}", "--dbname", "${COMPOSE_PROJECT_NAME}"]
interval: 10s
@@ -19,6 +19,35 @@ services:
retries: 5
start_period: 20s
# pgAdmin
# Rich administration and development platform for PostgreSQL.
# https://www.pgadmin.org/
pgadmin:
image: dpage/pgadmin4:${PGADMIN_VERSION:-8.11}
depends_on:
postgresql:
condition: service_healthy
restart: "no"
configs:
- source: pgadmin_config
target: /pgadmin4/servers.json
volumes:
- pgadmin:/var/lib/pgadmin/
ports:
- "3009:80"
environment:
PGADMIN_DEFAULT_EMAIL: ${ADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${ADMIN_PASSWORD}
PGADMIN_DISABLE_POSTFIX: true
profiles:
- admin
# ----------------------------------------------------------------------
# Business Intelligence
#
# ----------------------------------------------------------------------
superset:
image: apache/superset:3.1.3
depends_on:
@@ -40,6 +69,8 @@ services:
superset init &&
superset run -h 0.0.0.0 -p 8088 --with-threads --reload --debugger
"
profiles:
- bi
metabase:
image: metabase/metabase:v0.56.5.5
@@ -67,12 +98,16 @@ services:
MB_EMAIL_SMTP_HOST: mailpit
MB_EMAIL_SMTP_PORT: 1025
MB_EMAIL_FROM_ADDRESS: metabase@univ-lorraine.fr
profiles:
- bi
metabase-init:
build:
context: ./metabase
depends_on:
- metabase
profiles:
- bi
# CouchDB
# Single-node document database
@@ -139,6 +174,109 @@ services:
environment:
NEO4J_AUTH: neo4j/${DB_ROOT_PASSWORD:-!ChangeMe!}
# Caddy
# Web server, load balancer, and reverse proxy
# https://caddyserver.com/
caddy:
image: caddy:2.10.2
restart: "no"
ports:
- "8080:80"
- "2019:2019"
volumes:
- ./data:/usr/share/caddy
# ----------------------------------------------------------------------
# Web API
#
# ----------------------------------------------------------------------
# PostgREST
# Serve a fully RESTful API from any existing PostgreSQL database.
# It provides a cleaner, more standards-compliant, faster API than you are likely to write from scratch.
# https://docs.postgrest.org/en/v12/
postgrest:
image: postgrest/postgrest:${POSTGREST_VERSION:-v13.0.7}
restart: "no"
depends_on:
database:
condition: service_healthy
command: postgrest
ports:
- 3005:3005
environment:
PGRST_DB_URI: postgres://${POSTGREST_USER:-postgrest}:${DB_PASSWORD}@${POSTGREST_HOST:-postgresql}:${POSTGREST_DB_PORT:-5432}/${DB_NAME:-postgrest}
PGRST_DB_SCHEMAS: ${POSTGREST_DB_SCHEMAS:-public}
PGRST_DB_ANON_ROLE: ${POSTGREST_DB_ANON_ROLE:-role_web}
PGRST_JWT_SECRET: ${POSTGREST_JWT_SECRET:-ABCDEFGHIJKLMNOPQRSTUVWXYZ}
PGRST_DB_USE_LEGACY_GUCS: ${POSTGREST_DB_USE_LEGACY_GUCS:-false}
PGRST_APP_SETTINGS_JWT_SECRET: ${POSTGREST_APP_SETTINGS_JWT_SECRET}
PGRST_APP_SETTINGS_JWT_EXP: ${POSTGREST_APP_SETTINGS_JWT_EXP}
PGRST_ADMIN_SERVER_PORT: 3055
PGRST_SERVER_PORT: 3005
profiles:
- api
# ----------------------------------------------------------------------
# Observabilité - Télémétrie
#
# ----------------------------------------------------------------------
# Grafana
# Open source analytics & monitoring solution for every database.
# https://grafana.com/
grafana:
image: grafana/grafana-oss:${GRAFANA_VERSION:-12.2}
restart: no
depends_on:
- loki
deploy:
resources:
limits:
memory: 100M
configs:
- source: grafana_datasources
target: /etc/grafana/provisioning/datasources
- source: grafana_dashboards
target: /etc/grafana/dashboards
volumes:
- grafana:/var/lib/grafana
ports:
- 3000:3000
#environment:
#GF_SECURITY_ADMIN_EMAIL: ${ADMIN_EMAIL}
#GF_SECURITY_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
#GF_AUTH_ANONYMOUS_ENABLED: true # Enabled the Anonymous user no user/pass needed
#GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
#GF_AUTH_DISABLE_LOGIN_FORM: true
#GF_USERS_DEFAULT_THEME: light
#GF_USERS_ALLOW_SIGN_UP: false
#GF_FEATURE_TOGGLES_ENABLE: traceQLStreaming metricsSummary lokiFormatQuery alertmanagerRemoteOnly
#GF_INSTALL_PLUGINS: yesoreyeram-infinity-datasource
profiles:
- telemetry
# Prometheus
# Prometheus is an open-source systems monitoring and alerting toolkit
# https://prometheus.io/
prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION:-v3.6.0}
configs:
- source: prometheus_config
target: /etc/prometheus/prometheus.yml
volumes:
- prometheus:/prometheus
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 9090:9090
#extra_hosts:
# - host.docker.internal=host-gateway
profiles:
- telemetry
volumes:
database_data:
superset_home:
@@ -148,3 +286,9 @@ volumes:
redis_data:
neo4j_data:
neo4j_logs:
prometheus:
grafana:
configs:
pgadmin_config:
file: ./pgadmin-servers.json