mirror of
https://github.com/TronoSfera/backup_service.git
synced 2026-05-18 10:03:32 +03:00
65 lines
No EOL
2.7 KiB
Text
65 lines
No EOL
2.7 KiB
Text
# 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
|
||
|
||
# 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 human‑readable name for this client. Defaults to the hostname.
|
||
CLIENT_NAME=example-client
|
||
|
||
# Comma‑separated 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
|
||
|
||
# Semicolon‑separated 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 |