forked from ariska/karung-web-admin
60 lines
2.6 KiB
Bash
60 lines
2.6 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
|
|
# sudo systemctl restart karung-web-admin-pull-sources.service
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Source URLs (required for pull_sources.py)
|
|
# -----------------------------------------------------------------------------
|
|
# Grouping:
|
|
# `|` separates cameras (K1, K2, ...)
|
|
# `,` separates hosts inside one camera (counts are summed into that Kn)
|
|
# No `|` keeps legacy behavior: each comma-separated host is its own Kn
|
|
# One multi-host camera only: add a trailing `|` (e.g. http://a,http://b|)
|
|
|
|
# Tuang (KTC) — cameras labeled K1 - Use, K2 - Use, ...
|
|
# 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
|
|
|
|
# Masuk (KPC) — cameras labeled K1 - In / K1 - Out, K2 - In / K2 - Out, ...
|
|
# KPC_BASE_URL=http://REPLACE_HOST_A:7000,http://REPLACE_HOST_B:7000|http://REPLACE_HOST_C:7000
|
|
KPC_BASE_URL=http://REPLACE_HOST_A:7000|http://REPLACE_HOST_B:7000
|
|
|
|
# How many days of history to pull from source APIs (default: 30)
|
|
SOURCE_HISTORY_DAYS=30
|
|
|
|
# Pull loop interval in seconds (default: 30)
|
|
SOURCE_PULL_INTERVAL_SECONDS=30
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# 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
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# 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
|
|
|
|
# Optional path for exported counter settings JSON (used by other services)
|
|
# COUNTER_SETTINGS_FILE=counter_settings.json
|