diff --git a/compose.bi.yaml b/compose.bi.yaml index 3df19e0..9d27424 100644 --- a/compose.bi.yaml +++ b/compose.bi.yaml @@ -1,70 +1,3 @@ -# ---------------------------------------------------------------------- -# Business Intelligence -# -# ---------------------------------------------------------------------- -services: - 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 - 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: superset.localhost - caddy.reverse_proxy: "{{upstreams 80}}" - caddy.tls: internal - - metabase-init: - build: - context: ./metabase - depends_on: - - metabase volumes: - superset_home: diff --git a/compose.yaml b/compose.yaml index 38784c8..3ffece4 100644 --- a/compose.yaml +++ b/compose.yaml @@ -70,7 +70,7 @@ services: # https://www.pgadmin.org/ pgadmin: - image: dpage/pgadmin4:${PGADMIN_VERSION:-9.8} + image: dpage/pgadmin4:9.8 depends_on: database: condition: service_healthy @@ -274,6 +274,73 @@ services: image: ghcr.io/shopify/toxiproxy restart: "no" +# ---------------------------------------------------------------------- +# Business Intelligence +# +# ---------------------------------------------------------------------- + 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 + + 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: superset.localhost + caddy.reverse_proxy: "{{upstreams 80}}" + caddy.tls: internal + + metabase-init: + build: + context: ./metabase + depends_on: + - metabase + # ---------------------------------------------------------------------- # Observabilité - Télémétrie # @@ -283,10 +350,8 @@ services: # Open source analytics & monitoring solution for every database. # https://grafana.com/ grafana: - image: grafana/grafana-oss:12.2 + image: grafana/grafana-oss:12.1.0 restart: no - depends_on: - - loki deploy: resources: limits: @@ -321,7 +386,7 @@ services: # Prometheus is an open-source systems monitoring and alerting toolkit # https://prometheus.io/ prometheus: - image: prom/prometheus:-v3.6.0 + image: prom/prometheus:v3.6.0 configs: - source: prometheus_config target: /etc/prometheus/prometheus.yml @@ -348,6 +413,7 @@ volumes: neo4j_logs: prometheus: grafana: + superset_home: configs: pgadmin_config: diff --git a/postgresql.Dockerfile b/postgresql.Dockerfile index 3013916..2c06488 100644 --- a/postgresql.Dockerfile +++ b/postgresql.Dockerfile @@ -121,26 +121,20 @@ RUN set -eux; \ locales; \ apt-get clean; \ sed -i '/fr_FR.UTF-8/s/^# //' /etc/locale.gen; \ - locale-gen; \ + locale-gen; ENV TZ=Europe/Paris ENV LANG=fr_FR.UTF-8 ENV LANGUAGE=fr_FR:fr ENV LC_ALL=fr_FR.UTF-8 -ENV POSTGIS_MAJOR=3 -ENV POSTGIS_VERSION=3.6.0+dfsg-1.pgdg13+1 - RUN set -eux; \ apt-get update; \ - apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR; \ apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; # fix: https://github.com/postgis/docker-postgis/issues/307 ca-certificates \ - \ - postgresql-18-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-18-postgis-$POSTGIS_MAJOR-scripts; \ + postgresql-postgis; \ rm -rf /var/lib/apt/lists/* # Copier uniquement les fichiers installés depuis le builder