Files
semantica/docker-compose.dev.yml
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

47 lines
1.1 KiB
YAML

services:
explorer:
command:
- python
- -m
- uvicorn
- semantica.explorer.app:app
- --host
- 0.0.0.0
- --port
- "8000"
- --reload
- --reload-dir
- /app/semantica
environment:
ALLOWED_ORIGINS: http://localhost:5173,http://127.0.0.1:5173,http://localhost:8000,http://127.0.0.1:8000
FALKORDB_HOST: falkordb
FALKORDB_PORT: "6379"
volumes:
- ./semantica:/app/semantica
- ./pyproject.toml:/app/pyproject.toml:ro
frontend:
image: node:22-alpine
working_dir: /app/explorer
command: sh -c "npm ci && npm run dev -- --host 0.0.0.0"
environment:
VITE_EXPLORER_API_TARGET: http://explorer:8000
VITE_EXPLORER_WS_TARGET: ws://explorer:8000
ports:
- "5173:5173"
volumes:
- ./explorer:/app/explorer
- explorer_node_modules:/app/explorer/node_modules
depends_on:
explorer:
condition: service_started
networks:
- semantica
networks:
semantica:
driver: bridge
volumes:
explorer_node_modules: