deploy(backend): add prod Dockerfiles, compose stack, nginx configs, deploy scripts
Multi-stage Dockerfiles for accounts-service/configs-service/gateway, a docker-compose.prod.yml wiring fresh Postgres+MinIO+the three services on a private network, nginx site templates for visual.loki-code.dev (static SPA + /api proxy) and bekend.loki-code.dev (full gateway proxy for the mod), and idempotent setup.sh/deploy.sh scripts for the VDS. Claude-Session: https://claude.ai/code/session_01F1M1Jic1wTSn4igUENynmZ
This commit is contained in:
parent
484adaaf52
commit
2735a1c161
9 changed files with 263 additions and 0 deletions
22
backend/deploy/setup.sh
Executable file
22
backend/deploy/setup.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# One-time first-install setup for LoVisual on this VDS. Safe to re-run.
|
||||
# Assumes: repo already cloned to /opt/lovisual, backend/.env already created (chmod 600).
|
||||
set -euo pipefail
|
||||
|
||||
REPO_DIR=/opt/lovisual
|
||||
|
||||
echo "==> nginx site configs"
|
||||
cp "$REPO_DIR/backend/deploy/nginx-visual.loki-code.dev.conf" /etc/nginx/sites-available/visual.loki-code.dev
|
||||
cp "$REPO_DIR/backend/deploy/nginx-bekend.loki-code.dev.conf" /etc/nginx/sites-available/bekend.loki-code.dev
|
||||
ln -sf /etc/nginx/sites-available/visual.loki-code.dev /etc/nginx/sites-enabled/visual.loki-code.dev
|
||||
ln -sf /etc/nginx/sites-available/bekend.loki-code.dev /etc/nginx/sites-enabled/bekend.loki-code.dev
|
||||
mkdir -p /var/www/visual.loki-code.dev/html
|
||||
nginx -t
|
||||
systemctl reload nginx
|
||||
|
||||
echo "==> certbot"
|
||||
certbot --nginx -d visual.loki-code.dev --non-interactive --agree-tos -m mauhhhh7@gmail.com --redirect || true
|
||||
certbot --nginx -d bekend.loki-code.dev --non-interactive --agree-tos -m mauhhhh7@gmail.com --redirect || true
|
||||
|
||||
echo "==> First deploy"
|
||||
"$REPO_DIR/backend/deploy/deploy.sh"
|
||||
Loading…
Add table
Add a link
Reference in a new issue