ZiB 36c9e42388 Add calc-only API entrypoint and Docker service 4 сар өмнө
..
Dockerfile b24d6678af Initial commit 4 сар өмнө
README.md 36c9e42388 Add calc-only API entrypoint and Docker service 4 сар өмнө
compose.yaml 36c9e42388 Add calc-only API entrypoint and Docker service 4 сар өмнө
entrypoint.sh 36c9e42388 Add calc-only API entrypoint and Docker service 4 сар өмнө
uvicorn_log.json b24d6678af Initial commit 4 сар өмнө

README.md

Docker

podman-compose

API & MCP

podman-compose -f room_cal/docker/compose.yaml up -d

Calc only

podman-compose -f room_cal/docker/compose.yaml up -d calc

Build

podman-compose -f room_cal/docker/compose.yaml build

podman

Build

podman build -f Dockerfile --network host -t $IMG_NAME ..

API

podman run --rm -it -p 8000:8000 -v ./config:/config $IMG_NAME

With healthcheck:

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)

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.

MCP

podman run --rm -it -p 8001:8001 -v ./config:/config $IMG_NAME /entrypoint.sh mcp

The ./config volume must contain config.json (start with a copy of room_cal/config.json). CalDAV credentials go in config.json under store.caldav — there is no separate caldav.env. Service API credential files (airbnb.env, booking.env) live there too, once generated, so it needs a writeable mount

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.

MCP service

Pass mcp as the first argument to entrypoint.sh. Variable defaults are baked in; override with environment variables if needed

Variable Default Notes
FASTMCP_HOST 0.0.0.0 MCP server bind address
FASTMCP_PORT 8001 MCP server bind port
FASTMCP_LOG_LEVEL INFO MCP log level