Files

63 lines
2.9 KiB
Bash

# karung-web-admin environment configuration
#
# Copy once per machine, then edit values for that site:
# cp .env.example .env
#
# Restart services after changes:
# sudo systemctl restart karung-web-admin.service karung-web-admin-pull-sources.service
# -----------------------------------------------------------------------------
# Source URLs (KTC/Tuang and KPC/Masuk)
# -----------------------------------------------------------------------------
# Grouping syntax:
# `|` separates cameras (K1, K2, ...)
# `,` separates hosts inside one camera (summed into that Kn)
# No `|` keeps legacy behavior: each comma-separated host is its own Kn
# One camera from many hosts: add a trailing `|` (e.g. http://a,http://b|)
#
# Example: K1 = three hosts summed, K2 = one host
# KTC_BASE_URL=http://REPLACE_HOST_A:9000,http://REPLACE_HOST_B:9000,http://REPLACE_HOST_C:9000|http://REPLACE_HOST_D:9000
KTC_BASE_URL=http://REPLACE_HOST_A:9000|http://REPLACE_HOST_B:9000
# Example: K1 = three hosts summed, K2 = two hosts summed
# KPC_BASE_URL=http://REPLACE_HOST_A:7000,http://REPLACE_HOST_B:7000,http://REPLACE_HOST_C:7000|http://REPLACE_HOST_D:7000,http://REPLACE_HOST_E:7000
KPC_BASE_URL=http://REPLACE_HOST_A:7000|http://REPLACE_HOST_B:7000
# History window (days) to pull and default query history window for API
SOURCE_HISTORY_DAYS=30
# Background pull interval (seconds)
SOURCE_PULL_INTERVAL_SECONDS=30
# -----------------------------------------------------------------------------
# Daily data business-day cutoffs (optional — overrides dashboard DB settings)
# -----------------------------------------------------------------------------
# Times use HH:MM or HH:MM:SS in LOCAL_TIMEZONE.
# Use 24:00:00 for end-of-day (calendar day until midnight).
# After cutoff, the dashboard labels that counter side as the next business date.
#
# LOCAL_TIMEZONE: Asia/Jakarta (WIB), Asia/Makassar (WITA), or Asia/Jayapura (WIT)
LOCAL_TIMEZONE=Asia/Jakarta
# When Karung Tuang (Use) rolls to the next business day
TUANG_CUTOFF_TIME=17:00:00
# When Karung Masuk (In/Out) rolls to the next business day
MASUK_CUTOFF_TIME=24:00:00
# -----------------------------------------------------------------------------
# Cycle API (maps K1 -> Kandang 1, K2 -> Kandang 2, etc.)
# -----------------------------------------------------------------------------
# Base URL without trailing slash; http:// is added automatically if omitted.
CYCLE_API_BASE_URL=http://192.168.192.106:5002
CYCLE_API_KEY=test-api-key
# -----------------------------------------------------------------------------
# Data file paths (optional — defaults are in the app directory)
# -----------------------------------------------------------------------------
# KARUNG_TUANG_JSON=karung_tuang.json
# KARUNG_MASUK_JSON=karung_masuk.json
# KARUNG_TUANG_DB=karung_tuang.db
# KARUNG_MASUK_DB=karung_masuk.db
# COUNTER_SETTINGS_FILE=counter_settings.json