File size: 1,628 Bytes
fdbdab0
 
 
 
 
 
 
 
 
 
 
 
 
2b0f766
fdbdab0
2b0f766
 
 
fdbdab0
2b0f766
fdbdab0
2b0f766
698f7fe
fdbdab0
cc7440f
fdbdab0
 
 
 
 
 
 
 
 
2b0f766
fdbdab0
 
2b0f766
fdbdab0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# ---------------------------------------------------------------------------
# Local-dev wrapper around the single-container HuggingFace Spaces image.
#
# This file used to spin up three services (FastAPI backend, CRA dev server,
# MongoDB). The HF deployment shape (single-container, SQLite on the bucket)
# is now also the local-dev shape — same image you push to the Space — so
# this is a one-service compose with a named volume that emulates the HF
# Storage Bucket mount.
#
# Override CYBERPANEL_HOST_PORT via .env (or shell) if 7861 conflicts; the
# in-container port is fixed at 7860 to mirror HF Spaces.
# ---------------------------------------------------------------------------

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    image: cybersecurity-panel:dev
    ports:
      - "${CYBERPANEL_HOST_PORT:-7861}:7860"
    environment:
      JWT_SECRET_KEY: ${JWT_SECRET_KEY:-CHANGEME-by-overriding-in-dot-env-file}
      GEMINI_API_KEY: ${GEMINI_API_KEY:-}
      OPENAI_API_KEY: ${OPENAI_API_KEY:-}
      VLLM_API_KEY: ${VLLM_API_KEY:-}
      VLLM_API_USERNAME: ${VLLM_API_USERNAME:-}
      GEMINI_MODEL: ${GEMINI_MODEL:-gemini-2.5-flash}
      CONFIG_PATH: ${CONFIG_PATH:-/home/user/app/cybersecurity_config.yaml}
      # Same-origin in single-container; only relevant for cross-origin dev.
      CORS_ORIGINS: ${CORS_ORIGINS:-*}
      # SQLite + ChromaDB persistence both land here. The named volume below
      # mirrors the HF Storage Bucket mount so user data survives rebuilds.
      DATA_DIR: /data
    volumes:
      - cybersecurity_data:/data

volumes:
  cybersecurity_data: