#### NETWORKS networks: traefik_front_network: external: true back_network: driver: bridge attachable: true #### SERVICES services: ### metabase metabase: container_name: metabase-app hostname: metabase-app image: metabase/metabase:latest environment: MB_DB_TYPE: postgres MB_DB_DBNAME: ${POSTGRE_DB_NAME} MB_DB_PORT: 5432 MB_DB_USER: ${POSTGRE_DB_USER} MB_DB_PASS: ${POSTGRE_DB_PASSWORD} MB_DB_HOST: postgres MB_PASSWORD_COMPLEXITY: strong MB_PASSWORD_LENGTH: 10 # JAVA_TIMEZONE: "${MB_JAVA_TIMEZONE}" restart: always networks: - traefik_front_network - back_network volumes: - /dev/urandom:/dev/random:ro depends_on: postgres: condition: service_healthy healthcheck: test: curl --fail -I http://localhost:3000/api/health || exit 1 interval: 15s timeout: 5s retries: 5 labels: - "traefik.enable=true" - "traefik.docker.network=traefik_front_network" # HTTP - "traefik.http.routers.metabase-http.rule=Host(`metabase.tips-of-mine.com`)" - "traefik.http.routers.metabase-http.entrypoints=http" - "traefik.http.routers.metabase-http.priority=49" # HTTPS - "traefik.http.routers.metabase-https.rule=Host(`metabase.tips-of-mine.com`)" - "traefik.http.routers.metabase-https.entrypoints=https" - "traefik.http.routers.metabase-https.tls=true" - "traefik.http.routers.metabase-https.priority=50" - "traefik.http.routers.metabase.service=metabase-https-service" # Middleware # Service - "traefik.http.services.metabase-https-service.loadbalancer.server.port=3000" ### postgres postgres: container_name: metabase-postgres hostname: metabase-postgres image: ${POSTGRES_IMAGE_TAG} environment: PGDATA: ${POSTGRE_DB_DATA} POSTGRES_DB: ${POSTGRE_DB_NAME} POSTGRES_PASSWORD: ${POSTGRE_DB_PASSWORD} POSTGRES_USER: ${POSTGRE_DB_USER} TZ: Europe/Paris restart: unless-stopped networks: - back_network volumes: - ./data:/var/lib/postgresql/data:rw healthcheck: test: [ "CMD", "pg_isready", "-q", "-d", "${POSTGRE_DB_NAME}", "-U", "${POSTGRE_DB_USER}" ] interval: 10s timeout: 5s retries: 3 start_period: 60s