feat: Version 1.10.0 — DB-Zugriff auf PHP-Bridge (DB4js_all.php) umgestellt
- lib/db.ts entfernt, mysql2-Abhängigkeit gestrichen - lib/phpdb.ts: HTTP-Client für alle DB-Operationen via DB4js_all.php - Alle API-Routen und Server Actions auf phpdb.ts umgestellt - compose.yml / docker-compose.prod.yml: MySQL/phpMyAdmin-Container entfernt - app/api/DB4js_all.php/route.ts: Proxy für Statistik-AJAX-Calls - Statistik-Grafik liest ab 2026 live aus logbuch statt StatistikJahre - PHP 7.3-Kompatibilität: str_contains → strpos Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-68
@@ -1,79 +1,14 @@
|
||||
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
|
||||
PHP_DB_URL: ${PHP_DB_URL}
|
||||
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
|
||||
@@ -88,6 +23,7 @@ services:
|
||||
networks:
|
||||
- proxy
|
||||
- gitea-internal
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
name: dockge_default
|
||||
@@ -95,5 +31,3 @@ networks:
|
||||
gitea-internal:
|
||||
name: gitea_gitea-internal
|
||||
external: true
|
||||
volumes:
|
||||
db_data: null
|
||||
|
||||
Reference in New Issue
Block a user