From bea350c8cc6156c66a08c8fd4ac86212f9d8ad1b Mon Sep 17 00:00:00 2001 From: julien Date: Mon, 24 Aug 2026 08:35:28 +0200 Subject: [PATCH] first commit --- .env | 15 +++++++++++++++ .env.example | 37 +++++++++++++++++++++++++++++++++++++ compose.yaml | 29 +++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 .env create mode 100644 .env.example create mode 100644 compose.yaml diff --git a/.env b/.env new file mode 100644 index 0000000..67da2ee --- /dev/null +++ b/.env @@ -0,0 +1,15 @@ +APP_URL=https://borg.delmar.bzh +WEB_PORT=8081 +SSH_PORT=22222 +PUID=1000 +PGID=1000 + +# Advanced: remap MariaDB (default 100) or ClickHouse (default 999) too. Only +# needed if the host user wants to manage every file under the data volume +# without root. Must not collide with PUID/PGID or any existing SSH client UID. +# MYSQL_PUID=1001 +# MYSQL_PGID=1001 +# CH_PUID=1002 +# CH_PGID=1002 + +ADMIN_PASS=V$s0p5w#9#S90zwR diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..a4b0d6e --- /dev/null +++ b/.env.example @@ -0,0 +1,37 @@ +# Borg Backup Server — Docker Configuration +# +# Copy this file to .env and edit the values below. +# docker-compose reads .env automatically. + +# Public URL — how browsers and agents reach BBS (use your server's IP or hostname) +APP_URL=http://YOUR_SERVER_IP:8080 + +# Web UI port (host side) +WEB_PORT=8080 + +# SSH port for borg agent connections (host side) +SSH_PORT=2222 + +# Map the app user (www-data) to your host user's UID/GID. Required when using +# bind mounts to avoid permission issues — especially on btrfs filesystems +# (e.g. Synology NAS) or when you want to read backup repositories directly +# from the host. +# +# Find your values with: id -u && id -g +# Defaults to 33 (www-data) if not set. +# +# Changing these after the first run triggers an automatic ownership migration +# on the data volume (one-time chown, can take minutes on large repositories). +# PUID=1000 +# PGID=1000 + +# Advanced: remap MariaDB (default 100) or ClickHouse (default 999) too. Only +# needed if the host user wants to manage every file under the data volume +# without root. Must not collide with PUID/PGID or any existing SSH client UID. +# MYSQL_PUID=1001 +# MYSQL_PGID=1001 +# CH_PUID=1002 +# CH_PGID=1002 + +# Admin password — only used on first run. Remove or leave blank to auto-generate. +# ADMIN_PASS=changeme diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..c35433f --- /dev/null +++ b/compose.yaml @@ -0,0 +1,29 @@ +name: borgbackupserver + +services: + bbs: + container_name: bbs + image: marcpope/borgbackupserver:latest + ports: + - "${WEB_PORT:-8080}:80" # Web UI + - "${SSH_PORT:-2222}:22" # SSH for borg agent connections + environment: + - APP_URL=${APP_URL:-http://localhost:8080} + - SSH_PORT=${SSH_PORT:-2222} + - WEB_PORT=${WEB_PORT:-8080} + volumes: + - bbs-data:/var/bbs + restart: unless-stopped + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" + +volumes: + bbs-data: + driver: local + driver_opts: + type: "none" + o: "bind" + device: "/nfs/backups"