Skip to content

Commit 34eee2c

Browse files
committed
feat: add Synology NAS deployment support
- docker-compose.synology.yml: simplified config (HTTP only, no Caddy, relative paths, optional local game volumes) - .github/workflows/build-synology-image.yml: automated AMD64 image build on push, exports .tar.gz artifact (30-day retention) - scripts/build-for-synology.ps1: manual PowerShell build script - docs/synology-deployment.md: complete deployment guide (Container Manager UI + SSH methods, troubleshooting) - docker-compose.yml: use BACKLOGIA_DATA_DIR variable for flexible volume paths (host-side only, no Python code change required) - .env.example: document BACKLOGIA_DATA_DIR variable
1 parent a66aa71 commit 34eee2c

File tree

6 files changed

+582
-6
lines changed

6 files changed

+582
-6
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ GOG_DB_DIR=C:/ProgramData/GOG.com/Galaxy/storage
3030
# LOCAL_GAMES_DIR_4=
3131
# LOCAL_GAMES_DIR_5=
3232

33+
# Data directory for storing Backlogia's database and config files
34+
# This should be a persistent volume in production to retain data across container restarts
35+
# For development, you can set this to a local directory (e.g., ./data)
36+
# BACKLOGIA_DATA_DIR=/path/to/backlogia/root/dir
37+
3338
# Authentication (optional)
3439
# ENABLE_AUTH=true
3540
# SESSION_EXPIRY_DAYS=30
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build Docker Image for Synology
2+
3+
on:
4+
push:
5+
branches: [deploy-synology]
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
18+
- name: Build Docker image
19+
run: docker build -t backlogia:latest .
20+
21+
- name: Export image to TAR
22+
run: docker save backlogia:latest -o backlogia.tar
23+
24+
- name: Compress TAR file
25+
run: gzip backlogia.tar
26+
27+
- name: Upload artifact
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: backlogia-docker-image
31+
path: backlogia.tar.gz
32+
retention-days: 30
33+
compression-level: 0 # Already compressed with gzip

docker-compose.synology.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Docker Compose configuration for Synology NAS deployment
2+
# This file is OPTIONAL - the recommended method is to use Synology Container Manager UI
3+
#
4+
# This configuration is for advanced users who prefer using docker-compose via SSH
5+
# For most users, importing the image via Container Manager UI is simpler
6+
7+
services:
8+
backlogia:
9+
image: backlogia:latest # Image imported from GitHub Actions artifact
10+
container_name: backlogia
11+
ports:
12+
- "5050:5050"
13+
networks:
14+
- backlogia-net
15+
volumes:
16+
# Persistent data - uses relative "./data" path by default
17+
# Users can modify these paths via Synology Container Manager UI or by editing this file
18+
- ./data:/data
19+
- ./data/legendary:/root/.config/legendary
20+
- ./data/nile:/root/.config/nile
21+
- ./logs:/app/logs
22+
23+
# Optional volumes for local game directories (uncomment if needed)
24+
# Replace with your actual game folder paths on the NAS
25+
# - /volume1/games:/local-games-1:ro
26+
# - /volume1/media/games:/local-games-2:ro
27+
# - /volume2/games:/local-games-3:ro
28+
# - /volume3/games:/local-games-4:ro
29+
# - /volume4/games:/local-games-5:ro
30+
environment:
31+
# Core application settings
32+
- DATABASE_PATH=/data/game_library.db
33+
- PORT=5050
34+
- DEBUG=false
35+
36+
# Note: API keys (Steam, IGDB, itch.io, Humble, Battle.net, etc.)
37+
# are NOT required here. They are configured via the web Settings UI
38+
# at http://[NAS-IP]:5050/settings and stored in the SQLite database.
39+
restart: unless-stopped
40+
41+
networks:
42+
backlogia-net:
43+
driver: bridge

docker-compose.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ services:
77
networks:
88
- backlogia-net
99
volumes:
10-
- ./data:/data
11-
- ./data/legendary:/root/.config/legendary
12-
- ./data/nile:/root/.config/nile
13-
- ${GOG_DB_DIR:-./.empty}:/gog:ro
10+
- ${BACKLOGIA_DATA_DIR:-.}/data:/data
11+
- ${BACKLOGIA_DATA_DIR:-.}/data/legendary:/root/.config/legendary
12+
- ${BACKLOGIA_DATA_DIR:-.}/data/nile:/root/.config/nile
13+
- ${BACKLOGIA_DATA_DIR:-.}/logs:/app/logs
14+
- ${GOG_DB_DIR:-.}:/gog:ro
1415
# Local game folders (up to 5 by default, add more if needed)
1516
- ${LOCAL_GAMES_DIR_1:-./.empty}:/local-games-1:ro
1617
- ${LOCAL_GAMES_DIR_2:-./.empty}:/local-games-2:ro
@@ -58,8 +59,8 @@ services:
5859
- "443:443"
5960
volumes:
6061
- ./Caddyfile:/etc/caddy/Caddyfile:ro
61-
- ./data/caddy_data:/data
62-
- ./data/caddy_config:/config
62+
- ${BACKLOGIA_DATA_DIR:-./data}/caddy_data:/data
63+
- ${BACKLOGIA_DATA_DIR:-./data}/caddy_config:/config
6364
networks:
6465
- backlogia-net
6566
restart: unless-stopped

0 commit comments

Comments
 (0)