Files
oikos/.env.example
T
Ulas Kalayci b545d83f64 fix: modal onClose callback, calendar popup truncation, datetime validation
- modal.js: add onClose callback to openModal(), fix _initialFormTimeout
  cleanup, deduplicate escape/overlay-click handlers in confirmModal,
  promptModal, selectModal using the new callback
- calendar.js: replace popup.innerHTML with insertAdjacentHTML (constraint),
  add truncateDescription() to cap long event descriptions at 500 chars
- validate.js: extend DATETIME_RE to cover ISO 8601 with ms/timezone,
  normalise datetime values to YYYY-MM-DDTHH:MM on input
- index.js: include app version in startup log message
- docker-compose.yml / .env.example: switch from named volume to
  host-mounted DATA_DIR/BACKUP_DIR with sane defaults
- docs/installation.md: document host-mount data paths

Co-Authored-By: Rafael Foster <rafaelfoster@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 07:00:07 +02:00

50 lines
1.5 KiB
Bash

# Oikos - Environment Variables
# Copy this file to .env and adjust the values.
# Server
PORT=3000
NODE_ENV=production
# LOG_LEVEL=info # debug, info, warn, error (default: info)
# Docker storage paths
# DATA_DIR=./data # Host folder for the database and stored app data
# BACKUP_DIR=./backups # Host folder for scheduled backups
# Session
SESSION_SECRET=REPLACE_WITH_A_LONG_RANDOM_STRING
# SESSION_SECURE=false # Only set when not using HTTPS/reverse proxy (e.g. direct localhost)
# Database (SQLite/SQLCipher)
DB_PATH=/data/oikos.db
DB_ENCRYPTION_KEY=REPLACE_WITH_A_STRONG_ENCRYPTION_KEY
# Weather (OpenWeatherMap)
OPENWEATHER_API_KEY=YOUR_API_KEY
OPENWEATHER_CITY=Berlin
OPENWEATHER_UNITS=metric
OPENWEATHER_LANG=de
# Google Calendar (optional)
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=https://your-domain.com/api/v1/calendar/google/callback
# Apple Calendar CalDAV (optional)
APPLE_CALDAV_URL=https://caldav.icloud.com
APPLE_USERNAME=
APPLE_APP_SPECIFIC_PASSWORD=
# Calendar sync interval in minutes (default: 15)
SYNC_INTERVAL_MINUTES=15
# Automatic Backups
# BACKUP_ENABLED=true # Enable/disable automated backups (default: true)
# BACKUP_SCHEDULE=0 2 * * * # Cron schedule (default: 2 AM daily)
# BACKUP_KEEP=7 # Number of backups to keep (default: 7)
# TZ=Europe/Berlin # Timezone for scheduled backups (default: UTC)
# Security
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_ATTEMPTS=5
RATE_LIMIT_BLOCK_DURATION_MS=900000