From b219df2b93171dbdd48fc949e191aeb0d75ef82e Mon Sep 17 00:00:00 2001 From: Nicolai Date: Tue, 24 Mar 2026 15:28:11 +0100 Subject: [PATCH] docker reboot unless stopped --- Dockerfile | 3 ++- README.md | 13 +++++++++++++ docker-compose.yml | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 87efd01..a2e9f9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,8 @@ COPY webapp/backend ./webapp/backend COPY data ./data RUN pip install --no-cache-dir --upgrade pip \ - && pip install --no-cache-dir ".[web]" + && pip install --no-cache-dir ".[web]" \ + && pip install --no-cache-dir gurobipy COPY --from=frontend-build /app/webapp/frontend/dist ./webapp/frontend/dist diff --git a/README.md b/README.md index 388a4cb..6d08530 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,19 @@ Optionale Runtime-Parameter: - `APP_HOST` (Default: `0.0.0.0`) - `APP_PORT` (Default: `8000`) - `LOG_LEVEL` (Default: `info`) +- `GRB_LICENSE_FILE` (Default im Compose: `/app/licenses/gurobi.lic`) +- optional für WLS: `GRB_WLSACCESSID`, `GRB_WLSSECRET`, `GRB_LICENSEID` + +### Gurobi im Docker-Container + +- `gurobipy` wird im Runtime-Image installiert. +- Für klassische Lizenzdatei: `./licenses/gurobi.lic` auf dem Host ablegen. +- Für WLS statt Datei: die drei `GRB_*`-Variablen im Shell-Environment setzen. +- Verfügbarkeit prüfen: + +```bash +curl http://localhost:8080/api/health +``` ## Abhängigkeiten diff --git a/docker-compose.yml b/docker-compose.yml index 3856074..d9d7278 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,11 +4,17 @@ services: context: . dockerfile: Dockerfile image: leag-coallog:latest + restart: unless-stopped ports: - "8080:8080" environment: APP_HOST: 0.0.0.0 APP_PORT: "8080" LOG_LEVEL: info + GRB_LICENSE_FILE: ${GRB_LICENSE_FILE:-/app/licenses/gurobi.lic} + GRB_WLSACCESSID: ${GRB_WLSACCESSID:-} + GRB_WLSSECRET: ${GRB_WLSSECRET:-} + GRB_LICENSEID: ${GRB_LICENSEID:-} volumes: - ./var:/app/var + - ./licenses:/app/licenses:ro