# Docker ## podman-compose ### API ```bash podman-compose -f room_cal/docker/compose.yaml up -d ``` ### Calc only ```bash podman-compose -f room_cal/docker/compose.yaml up -d calc ``` ### Build ```bash podman-compose -f room_cal/docker/compose.yaml build ``` ## podman ### Build ```bash podman build -f Dockerfile --network host -t $IMG_NAME .. ``` ### API ```bash podman run --rm -it -p 8000:8000 -v ./config:/config $IMG_NAME ``` With healthcheck: ```bash podman run --rm -it -p 8000:8000 -v ./config:/config \ --health-cmd "curl -sf http://localhost:8000/health" \ --health-interval 30s --health-timeout 10s \ --health-retries 3 --health-start-period 60s \ $IMG_NAME ``` ### Calc (standalone fee/tax calculator) ```bash podman run --rm -it -p 8000:8000 -v ./config:/config $IMG_NAME /entrypoint.sh calc ``` Serves only the `/calc/*` endpoints and the `calc.html` UI at `/`. No Store, CalDAV, or service-API credentials needed — only the `services` and `global.taxes` sections of `config.json` are read. Placing a `uvicorn_log.json` in `./config` overrides the default log config ## Environment variables ### Common | Variable | Default | Notes | |----------|---------|-------| | `ROOM_CAL_DATA_HOME` | `/config` | Config and credential root | ### API service Default entrypoint. Variable defaults are baked in; override with environment variables if needed | Variable | Default | Notes | |----------|---------|-------| | `API_HOST` | `0.0.0.0` | Uvicorn bind address | | `API_PORT` | `8000` | Uvicorn bind port | | `LOG_LEVEL` | `info` | Uvicorn log level | | `AUTH_DISABLED` | *(unset)* | Set to `1` to bypass OIDC | | `OIDC_ISSUER` | *(unset)* | OIDC provider base URL | | `OIDC_CLIENT_ID` | *(unset)* | OIDC client ID | | `OIDC_CLIENT_SECRET` | *(unset)* | OIDC client secret | | `APP_BASE_URL` | `http://localhost:8000` | Public base URL; sets the OIDC redirect URI and cookie `Secure` flag | | `SESSION_SECRET` | random per restart | Set this to a static value to preserve sessions between runs | | `DISABLE_PERIODIC` | *(unset)* | Set to `1` to skip credential probes and all periodic syncs (reservations, prices) in the health loop | ### Calc service Pass `calc` as the first argument to `entrypoint.sh`. Uses the same `API_HOST`, `API_PORT`, and `LOG_LEVEL` variables as the API service. Only `services` and `global.taxes` are read from `config.json` — no store, auth, or service-API config required.