backup_service/.env.example
2026-01-19 11:37:03 +03:00

71 lines
2.9 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Example environment variables for the backup service
#
# Copy this file to `.env` and adjust the values as needed. Both the
# server and client read configuration from environment variables. When
# using Docker Compose you can reference this file via the `env_file`
# directive or set variables in the compose file directly.
# -----------------------------------------------------------------------------
# Server configuration
# -----------------------------------------------------------------------------
SECRET_KEY=mysecretkey
# Initial admin credentials (created on first startup if no users exist).
# If omitted, the server falls back to USERNAME/PASSWORD for backward
# compatibility with older compose files.
ADMIN_USERNAME=admin
ADMIN_PASSWORD=adminpass
# Use Postgres instead of SQLite. This DSN is used by SQLAlchemy. If you
# leave it empty or omit it, the server will fall back to a local SQLite
# database stored in `/app/backup.db`.
DATABASE_URL=postgresql+psycopg2://backup:backup@db:5432/backup
# Configure S3 storage. When S3_BUCKET is defined the server will use
# Amazon S3 (or any S3-compatible service) to store backup files. If
# omitted, files are stored on the local filesystem under `/app/data`.
S3_BUCKET=backup
AWS_ACCESS_KEY_ID=minio
AWS_SECRET_ACCESS_KEY=minio123
AWS_REGION=us-east-1
S3_ENDPOINT=http://minio:9000
# -----------------------------------------------------------------------------
# Client configuration
# -----------------------------------------------------------------------------
# URL of the backup server. For local deployments this will typically be
# `http://server:8000` when using Docker Compose. When running the
# client independently, set this to the public address of your server.
SERVER_URL=http://server:8000
# Credentials of a user with permission to register new clients on the server.
USERNAME=admin
PASSWORD=adminpass
# Optional humanreadable name for this client. Defaults to the hostname.
CLIENT_NAME=example-client
# Commaseparated list of directories to back up. The client will walk
# these directories recursively and upload files that have changed since
# the last backup.
MONITORED_PATHS=/data
# Semicolonseparated list of shell commands to run before each backup cycle.
# This can be used, for example, to dump a PostgreSQL database. Leave empty
# if not needed.
PRE_COMMANDS=
# Seconds between ping requests to the server. Pings update the last
# heartbeat timestamp for the client in the server UI.
PING_INTERVAL=300
# Seconds between full backup scans. Lower this value to increase the
# frequency of backups.
BACKUP_INTERVAL=3600
# Enable or disable the client web interface. When set to `false`, the
# client does not launch the configuration UI and requires all mandatory
# variables (SERVER_URL, USERNAME, PASSWORD and MONITORED_PATHS) to be
# provided. When `true` (default), the client starts a small web server on
# port 8080 to collect configuration interactively.
CLIENT_UI_ENABLED=true