Files
semantica/deploy/fly/fly.toml
T
KaifAhmad1 b2c949f7de fix(deploy): harden security in deployment templates and explorer app
- GCP: remove --allow-unauthenticated, restrict ingress to
  internal-and-cloud-load-balancing, replace wildcard ALLOWED_ORIGINS=*
  with a substitution variable (_ALLOWED_ORIGINS) so operators supply a
  real URL at deploy time; same fix in cloudrun-service.yaml
- Fly.io: replace hardcoded FALKORDB_HOST=localhost with the correct
  .internal private-network hostname pattern; update README accordingly
- docker-compose.dev.yml: add missing top-level networks: block so the
  frontend service can join the semantica network without --file layering
- K8s/Helm: add readOnlyRootFilesystem: true + runAsUser: 1000 to
  container securityContext; mount an emptyDir /tmp so uvicorn can write
  temp files
- app.py: fix _read_explorer_settings() or-chain, use in os.environ
  checks so an explicit ALLOWED_ORIGINS="" produces an empty allow-list
  instead of silently falling through to localhost defaults; remove dead
  app.state.falkordb_host/port attributes
- docs: update four locations that still documented {"status":"healthy"}
  to reflect the new {"status":"ok"} health response
- tests: update test assertion to read falkordb settings from
  app.state.explorer_settings instead of removed top-level attributes
2026-06-24 12:51:09 +05:30

33 lines
766 B
TOML

app = "semantica-knowledge-explorer"
primary_region = "iad"
kill_signal = "SIGTERM"
kill_timeout = "30s"
[build]
dockerfile = "Dockerfile"
[env]
ALLOWED_ORIGINS = "https://semantica-knowledge-explorer.fly.dev"
# Set via: flyctl secrets set FALKORDB_HOST=<your-falkordb-app-name>.internal FALKORDB_PORT=6379
# Do not use localhost unless FalkorDB runs as a co-located process in the same Machine.
FALKORDB_HOST = "falkordb-REPLACE_ME.internal"
FALKORDB_PORT = "6379"
[http_service]
internal_port = 8000
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
[[http_service.checks]]
grace_period = "20s"
interval = "30s"
method = "GET"
timeout = "5s"
path = "/api/health"
[[vm]]
size = "shared-cpu-1x"
memory = "512mb"