feat: Add deployment documentation and templates (issue #12) #23

Merged
shoko merged 2 commits from fix/issue-12 into main 2026-04-09 01:23:54 +02:00
Owner

Summary

Created deployment documentation and templates for issue #12.

Changes Made

New /deployment/ directory:

  • DEPLOYMENT.md - Comprehensive deployment guide covering:

    • Server requirements (Debian, Python 3.10+, Node.js 18+, Nginx, SSL)
    • Step-by-step deployment instructions
    • Project structure
    • Troubleshooting guide
  • scripts/nginx-template.conf - Nginx configuration template with:

    • HTTP to HTTPS redirect
    • SSL/TLS configuration
    • Reverse proxy to backend (localhost:8000/api/)
    • WebSocket support
    • Frontend static files serving
    • Gzip compression
  • scripts/systemd-template.service - Systemd service template with:

    • Auto-restart on failure
    • Environment file support
    • Proper logging
  • scripts/deploy.sh - Automated deployment script for rolling updates

Approach

As discussed in the issue, this creates version-controlled deployment documentation and reusable templates instead of directly configuring a server. This allows:

  • Review before applying
  • Reusable across deployments
  • Documentation of the intended structure

Dependencies

  • Requires Backend Setup (issue #2) - systemd service points to backend
  • Requires Frontend Components (issue #10) - nginx serves frontend static files

Fixes #12

## Summary Created deployment documentation and templates for issue #12. ### Changes Made **New `/deployment/` directory:** - `DEPLOYMENT.md` - Comprehensive deployment guide covering: - Server requirements (Debian, Python 3.10+, Node.js 18+, Nginx, SSL) - Step-by-step deployment instructions - Project structure - Troubleshooting guide - `scripts/nginx-template.conf` - Nginx configuration template with: - HTTP to HTTPS redirect - SSL/TLS configuration - Reverse proxy to backend (localhost:8000/api/) - WebSocket support - Frontend static files serving - Gzip compression - `scripts/systemd-template.service` - Systemd service template with: - Auto-restart on failure - Environment file support - Proper logging - `scripts/deploy.sh` - Automated deployment script for rolling updates ### Approach As discussed in the issue, this creates version-controlled deployment documentation and reusable templates instead of directly configuring a server. This allows: - Review before applying - Reusable across deployments - Documentation of the intended structure ### Dependencies - Requires **Backend Setup** (issue #2) - systemd service points to backend - Requires **Frontend Components** (issue #10) - nginx serves frontend static files Fixes #12
shoko added 1 commit 2026-04-09 00:34:49 +02:00
Created comprehensive deployment guide with:

- DEPLOYMENT.md: Full documentation covering server requirements,
  step-by-step deployment, troubleshooting, and project structure
- scripts/nginx-template.conf: Nginx configuration with SSL, reverse
  proxy to backend, and frontend static file serving
- scripts/systemd-template.service: Systemd service for auto-restart
  and environment variable management
- scripts/deploy.sh: Automated deployment script for rolling updates
han requested changes 2026-04-09 00:59:05 +02:00
Dismissed
han left a comment
First-time contributor

change git.fbrns.co to git.example.com

change git.fbrns.co to git.example.com
@@ -0,0 +30,4 @@
sudo mkdir -p /var/www/bot
sudo chown -R $USER:$USER /var/www/bot
cd /var/www/bot
git clone https://git.fbrns.co/shoko/randebu.git .
First-time contributor

change this to git.example.com

change this to git.example.com
@@ -0,0 +3,4 @@
DEPLOY_DIR="/var/www/bot"
DOMAIN="bot.yourdomain.com"
GIT_REPO="https://git.fbrns.co/shoko/randebu.git"
First-time contributor

change this to git.example.com

change this to git.example.com
shoko added 1 commit 2026-04-09 01:00:14 +02:00
As per review feedback, changed all git instance URLs to use
git.example.com as a placeholder since the code will be hosted
on a different instance.
han approved these changes 2026-04-09 01:22:22 +02:00
han left a comment
First-time contributor

lgtm

lgtm
First-time contributor

can you merge this PR with squash so the previous git.fbrns.co commit isn't merged to the main branch?

can you merge this PR with squash so the previous git.fbrns.co commit isn't merged to the main branch?
shoko merged commit 2561759b78 into main 2026-04-09 01:23:54 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/randebu#23