62 lines
2.2 KiB
YAML
62 lines
2.2 KiB
YAML
# =============================================================================
|
|
# sicabe-control-panel — deploy panel (Next.js) via Docker Compose.
|
|
#
|
|
# Build image dulu: ../../scripts/build-image.sh
|
|
# Lalu jalankan : docker compose up -d
|
|
#
|
|
# Persisten: volume bernama `panel-data` → `data/config.json` (hosts/modules/
|
|
# services/service types) + `data/state.json`. Backup/restore dari UI
|
|
# (Settings → Backup) tanpa menyentuh volume.
|
|
#
|
|
# PENTING: panel di container TIDAK bisa membaca filesystem platform → setiap
|
|
# host di SICABE_HOSTS WAJIB punya `configUrl` (config-agent).
|
|
#
|
|
# NETWORK: default `network_mode: host` karena gateway host
|
|
# (deploy/host-gateway) membuka `127.0.0.1:22375` — container di bridge TIDAK
|
|
# bisa menjangkaunya via host.docker.internal. Dengan host network, `127.0.0.1`
|
|
# berfungsi seperti di host (dan SAN sertifikat Trino `localhost` cocok).
|
|
# Lihat README.md untuk varian bridge.
|
|
# =============================================================================
|
|
|
|
name: sicabe-control-panel
|
|
|
|
services:
|
|
panel:
|
|
image: sicabe/control-panel:${PANEL_TAG:-latest}
|
|
# Biarkan `build` aktif bila ingin `docker compose up --build`.
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile
|
|
container_name: sicabe-control-panel
|
|
network_mode: host
|
|
# `.env` dibuat dari env.example (cp env.example .env). `required: false`
|
|
# agar `docker compose config` tetap valid sebelum file dibuat.
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
environment:
|
|
NODE_ENV: production
|
|
HOSTNAME: "0.0.0.0"
|
|
# Host network: port binding ditentukan PORT (bukan `ports:`).
|
|
PORT: "${PANEL_PORT:-3000}"
|
|
volumes:
|
|
- panel-data:/app/data
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
# ── Varian BRIDGE (bila gateway dibuka ke alamat non-loopback) ────────────
|
|
# Hapus `network_mode: host` di atas, lalu tambahkan:
|
|
# ports:
|
|
# - "${PANEL_PORT:-3000}:3000"
|
|
# extra_hosts:
|
|
# - "host.docker.internal:host-gateway"
|
|
# dan set SICABE_HOSTS/URL memakai host.docker.internal (perhatikan SAN TLS
|
|
# Trino — host.docker.internal TIDAK ada di SAN).
|
|
|
|
volumes:
|
|
panel-data:
|