services: logbuch_mysql: image: mysql:lts container_name: logbuch_mysql restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} MYSQL_DATABASE: ${DB_NAME} MYSQL_USER: ${DB_USER} MYSQL_PASSWORD: ${DB_PASS} volumes: - db_data:/var/lib/mysql ports: - "127.0.0.1:3336:3306" networks: - proxy healthcheck: test: - CMD - mysqladmin - ping - -h - localhost - -uroot - -p${DB_ROOT_PASS} interval: 10s timeout: 5s retries: 10 # Kein Port nach außen — nur internes Netzwerk logbuch_phpmyadmin: image: phpmyadmin:latest container_name: logbuch_phpmyadmin restart: unless-stopped environment: PMA_HOST: logbuch_mysql PMA_PORT: 3306 PMA_ABSOLUTE_URI: https://logbuch.fuerst-stuttgart.de/myadmin/ depends_on: logbuch_mysql: condition: service_healthy labels: - traefik.enable=true - traefik.http.routers.logbuch-pma.entrypoints=http - traefik.http.routers.logbuch-pma.rule=Host(`logbuch.fuerst-stuttgart.de`) && PathPrefix(`/myadmin`) - traefik.http.middlewares.logbuch-pma-https-redirect.redirectscheme.scheme=https - traefik.http.routers.logbuch-pma.middlewares=logbuch-pma-https-redirect - traefik.http.routers.logbuch-pma-secure.entrypoints=https - traefik.http.routers.logbuch-pma-secure.rule=Host(`logbuch.fuerst-stuttgart.de`) && PathPrefix(`/myadmin`) - traefik.http.routers.logbuch-pma-secure.tls=true - traefik.http.routers.logbuch-pma-secure.middlewares=logbuch-pma-slash,logbuch-pma-strip - traefik.http.middlewares.logbuch-pma-slash.redirectregex.regex=^https://logbuch\.fuerst-stuttgart\.de/myadmin$$ - traefik.http.middlewares.logbuch-pma-slash.redirectregex.replacement=https://logbuch.fuerst-stuttgart.de/myadmin/ - traefik.http.middlewares.logbuch-pma-strip.stripprefix.prefixes=/myadmin - traefik.http.routers.logbuch-pma-secure.service=logbuch-pma - traefik.http.services.logbuch-pma.loadbalancer.server.port=80 networks: - proxy logbuch_app: image: docker.citysensor.de/logbuch:latest container_name: logbuch_app restart: unless-stopped environment: DB_HOST: logbuch_mysql DB_USER: ${DB_USER} DB_PASS: ${DB_PASS} DB_NAME: ${DB_NAME} DB_PORT: 3306 AUTH_SECRET: ${AUTH_SECRET} NODE_ENV: production ports: - 127.0.0.1:${APP_PORT:-3000}:3000 depends_on: logbuch_mysql: condition: service_healthy labels: - traefik.enable=true - traefik.http.routers.logbuch.entrypoints=http - traefik.http.routers.logbuch.rule=Host(`logbuch.fuerst-stuttgart.de`) - traefik.http.middlewares.logbuch-https-redirect.redirectscheme.scheme=https - traefik.http.routers.logbuch.middlewares=logbuch-https-redirect - traefik.http.routers.logbuch-secure.entrypoints=https - traefik.http.routers.logbuch-secure.rule=Host(`logbuch.fuerst-stuttgart.de`) - traefik.http.routers.logbuch-secure.tls=true - traefik.http.routers.logbuch-secure.service=logbuch - traefik.http.services.logbuch.loadbalancer.server.port=3000 networks: - proxy - gitea-internal networks: proxy: name: dockge_default external: true gitea-internal: name: gitea_gitea-internal external: true volumes: db_data: null