Files
sql/compose.yaml

260 lines
7.1 KiB
YAML
Raw Permalink Normal View History

2025-08-27 07:51:06 +02:00
services:
2025-10-13 11:12:42 +02:00
2025-10-13 15:21:35 +02:00
# ----------------------------------------------------------------------
2025-10-14 21:11:54 +02:00
# Proxy inverse
2025-10-13 15:21:35 +02:00
#
# ----------------------------------------------------------------------
2025-10-13 11:12:42 +02:00
# Caddy
# Web server, load balancer, and reverse proxy
# https://caddyserver.com/
caddy:
2025-10-13 11:56:51 +02:00
image: lucaslorentz/caddy-docker-proxy:2.10
2025-10-13 11:12:42 +02:00
restart: "no"
ports:
2025-10-14 07:31:52 +02:00
- "80:80"
- "443:443/tcp"
- "443:443/udp"
2025-10-13 11:56:51 +02:00
networks:
- caddy_net
environment:
2025-10-13 15:21:35 +02:00
CADDY_INGRESS_NETWORKS: ${COMPOSE_PROJECT_NAME}_caddy_net
2025-10-13 11:12:42 +02:00
volumes:
2025-10-14 09:06:39 +02:00
- caddy_config:/config
2025-10-16 08:52:44 +02:00
- caddy_data:/data
2025-10-14 07:31:52 +02:00
- /var/run/docker.sock:/var/run/docker.sock:ro
2025-10-15 07:30:31 +02:00
- ./data:/srv/www:ro
2025-10-14 09:06:39 +02:00
labels:
2025-10-16 08:52:44 +02:00
caddy: localhost
2025-10-14 09:06:39 +02:00
caddy.root: "* /srv/www"
2025-10-14 21:11:54 +02:00
caddy.file_server: "" # Active le serveur de fichiers statiques
caddy.tls: internal # HTTPS auto-signé géré par Caddy
2025-10-13 11:56:51 +02:00
2025-10-13 11:12:42 +02:00
# ----------------------------------------------------------------------
# Base de données relationnelles
#
# ----------------------------------------------------------------------
2025-08-27 07:51:06 +02:00
database:
2025-10-06 19:26:02 +02:00
image: iut/pgsql:2025-12
2025-08-27 07:51:06 +02:00
environment:
POSTGRES_INITDB_ARGS: "--locale-provider=icu --icu-locale=fr-FR"
2025-10-13 07:49:20 +02:00
POSTGRES_PASSWORD: ${PG_PASSWORD:-!ChangeMe!}
2025-08-27 07:51:06 +02:00
POSTGRES_USER: ${COMPOSE_PROJECT_NAME}
volumes:
2025-10-06 19:26:02 +02:00
- database_data:/var/lib/postgresql:rw
2025-10-13 21:27:02 +02:00
- ./postgresql-entrypoint-initdb.d:/docker-entrypoint-initdb.d:Z
2025-11-01 08:18:17 +01:00
- ./data:/tmp:Z
2025-08-27 08:41:54 +02:00
ports:
2025-10-12 18:20:29 +02:00
- "5432:5432"
2025-10-14 21:11:54 +02:00
networks:
- caddy_net
2025-09-16 15:51:03 +02:00
healthcheck:
test: ["CMD", "pg_isready", "--username", "${COMPOSE_PROJECT_NAME}", "--dbname", "${COMPOSE_PROJECT_NAME}"]
interval: 10s
timeout: 5s
retries: 5
2025-09-19 10:02:52 +02:00
start_period: 20s
2025-08-27 07:51:06 +02:00
2025-10-14 21:11:54 +02:00
# ----------------------------------------------------------------------
# Administration
#
# ----------------------------------------------------------------------
2025-10-12 18:20:29 +02:00
# pgAdmin
# Rich administration and development platform for PostgreSQL.
# https://www.pgadmin.org/
pgadmin:
2025-10-14 09:49:29 +02:00
image: dpage/pgadmin4:9.8
2025-10-12 18:20:29 +02:00
depends_on:
2025-10-13 11:06:48 +02:00
database:
2025-10-12 18:20:29 +02:00
condition: service_healthy
2025-10-14 21:11:54 +02:00
caddy:
condition: service_started
2025-10-12 18:20:29 +02:00
restart: "no"
configs:
- source: pgadmin_config
target: /pgadmin4/servers.json
volumes:
- pgadmin:/var/lib/pgadmin/
environment:
2025-10-14 09:06:39 +02:00
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
2025-10-12 18:20:29 +02:00
PGADMIN_DISABLE_POSTFIX: true
2025-10-13 11:56:51 +02:00
networks:
- caddy_net
labels:
caddy: pgadmin.localhost
caddy.reverse_proxy: "{{upstreams 80}}"
caddy.tls: internal
2025-10-12 18:20:29 +02:00
2025-10-20 18:02:34 +02:00
# ----------------------------------------------------------------------
# Graphes
#
# ----------------------------------------------------------------------
2025-10-13 07:49:20 +02:00
# PostGraphile
# Instant GraphQL API
# https://www.graphile.org/postgraphile/
postgraphile:
2025-10-13 11:56:51 +02:00
image: iut/postgraphile:2025-12
2025-10-13 07:49:20 +02:00
restart: "no"
depends_on:
database:
condition: service_healthy
command:
[
2025-10-14 22:28:15 +02:00
"--port", "80",
2025-10-13 07:49:20 +02:00
"--schema", "${POSTGRAPHILE_SCHEMA:-public}",
"--enhance-graphiql",
"--cors",
"--allow-explain",
"--dynamic-json",
"--append-plugins",
"postgraphile-plugin-connection-filter,postgraphile-plugin-fulltext-filter,@graphile/postgis,postgraphile-plugin-connection-filter-postgis"
]
2025-10-13 12:01:58 +02:00
networks:
- caddy_net
2025-10-13 07:49:20 +02:00
environment:
2025-10-14 22:28:15 +02:00
- PGHOST=database
- PGPORT=5432
- PGUSER=${POSTGRAPHILE_USER:-postgraphile_user}
2025-10-14 21:11:54 +02:00
- PGPASSWORD=${POSTGRAPHILE_PASSWORD:-9013}
2025-10-13 07:49:20 +02:00
- PGDATABASE=${COMPOSE_PROJECT_NAME}
2025-10-14 18:06:00 +02:00
labels:
caddy: postgraphile.localhost
2025-10-14 22:28:15 +02:00
caddy.reverse_proxy: "{{upstreams 80}}"
2025-10-14 18:06:00 +02:00
caddy.tls: internal
2025-10-14 21:11:54 +02:00
2025-10-12 18:20:29 +02:00
# ----------------------------------------------------------------------
# Web API
#
# ----------------------------------------------------------------------
2025-10-13 07:49:20 +02:00
2025-10-13 16:30:11 +02:00
2025-10-13 16:35:40 +02:00
2025-10-14 09:49:29 +02:00
# ----------------------------------------------------------------------
# Business Intelligence
#
# ----------------------------------------------------------------------
2025-11-02 09:24:15 +01:00
# superset:
# image: apache/superset:3.1.3
# depends_on:
# database:
# condition: service_healthy
# environment:
# SUPERSET_CONFIG_PATH: /app/pythonpath/superset_config.py
# SUPERSET_SECRET_KEY: ${SUPERSET_SECRET:-YOUR_OWN_RANDOM_GENERATED_SECRET_KEY}
# SUPERSET_LOAD_EXAMPLES: no
# volumes:
# - superset_home:/app/superset_home
# - ./superset_config.py:/app/pythonpath/superset_config.py:Z
# command: >
# sh -c "
# superset db upgrade &&
# superset fab create-admin --username admin --firstname Admin --lastname User --email admin@superset.com --password admin &&
# superset init &&
# superset run -h 0.0.0.0 -p 80 --with-threads --reload --debugger
# "
# networks:
# - caddy_net
# labels:
# caddy: superset.localhost
# caddy.reverse_proxy: "{{upstreams 80}}"
# caddy.tls: internal
2025-10-14 09:49:29 +02:00
2025-11-02 09:24:15 +01:00
# metabase:
# image: metabase/metabase:v0.56.5.5
# depends_on:
# database:
# condition: service_healthy
# volumes:
# - /dev/urandom:/dev/random:ro
# environment:
# MB_DB_TYPE: postgres
# MB_DB_HOST: ${MB_DB_HOST:-database}
# MB_DB_PORT: 5432
# MB_DB_USER: metabase_user
# MB_DB_PASS: ${DB_ROOT_PASSWORD:-supermotdepasse}
# MB_DB_DBNAME: metabase
# MB_SITE_LOCALE: fr
# MB_ADMIN_EMAIL: etudiant@univ-lorraine.fr
# MB_ANON_TRACKING_ENABLED: false
# MB_CHECK_FOR_UPDATES: false
# MB_NO_SURVEYS: yes
# MB_START_OF_WEEK: monday
# MB_CUSTOM_FORMATTING: '{"type/Temporal":{"time_style":"HH:mm","date_style":"D MMMM, YYYY","date_abbreviate":true},"type/Currency":{"currency":"EUR"},"type/Number":{"number_separators":", "}}'
# MB_EMAIL_SMTP_HOST: mailpit
# MB_EMAIL_SMTP_PORT: 1025
# MB_EMAIL_FROM_ADDRESS: metabase@univ-lorraine.fr
# networks:
# - caddy_net
# labels:
# caddy: metabase.localhost
# caddy.reverse_proxy: "{{upstreams 3000}}"
# caddy.tls: internal
2025-10-14 09:49:29 +02:00
2025-11-02 09:24:15 +01:00
# metabase-init:
# build:
# context: ./metabase
# depends_on:
# - metabase
# networks:
# - caddy_net
2025-10-14 09:49:29 +02:00
2025-12-02 07:37:46 +01:00
2025-11-02 07:35:49 +01:00
# labels:
# caddy: rabbitmq.localhost
# caddy.reverse_proxy: "{{upstreams 15672}}"
# caddy.tls: internal
2025-10-14 21:11:54 +02:00
2025-10-12 18:20:29 +02:00
# ----------------------------------------------------------------------
# Observabilité - Télémétrie
#
# ----------------------------------------------------------------------
2025-11-02 09:24:15 +01:00
2025-10-12 18:20:29 +02:00
2025-10-16 16:10:33 +02:00
gatus:
image: twinproduction/gatus:v5.26.0
2025-10-17 07:29:28 +02:00
networks:
- caddy_net
labels:
caddy: gatus.localhost
caddy.reverse_proxy: "{{upstreams 8080}}"
caddy.tls: internal
2025-10-16 16:10:33 +02:00
mailpit:
image: axllent/mailpit:v1.27
2025-10-16 18:04:21 +02:00
restart: "no"
2025-10-16 16:10:33 +02:00
ports:
2025-10-17 07:29:28 +02:00
- 1025:1025
networks:
- caddy_net
2025-10-16 18:04:21 +02:00
environment:
TZ: Europe/Paris
volumes:
- mailpit:/data
2025-10-17 07:29:28 +02:00
labels:
caddy: mailpit.localhost
caddy.reverse_proxy: "{{upstreams 8025}}"
caddy.tls: internal
2025-10-16 16:10:33 +02:00
2025-08-27 07:51:06 +02:00
volumes:
2025-10-13 11:56:51 +02:00
caddy_config:
2025-10-14 09:06:39 +02:00
caddy_data:
2025-10-13 07:49:20 +02:00
pgadmin:
2025-08-27 07:51:06 +02:00
database_data:
2025-10-14 09:49:29 +02:00
superset_home:
2025-10-14 09:56:55 +02:00
rabbitmq_data:
2025-10-16 18:04:21 +02:00
mailpit:
2025-10-12 18:20:29 +02:00
configs:
pgadmin_config:
file: ./pgadmin-servers.json
2025-10-13 11:56:51 +02:00
networks:
caddy_net:
driver: bridge