This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
kassa/bin/deploy
T
nikolark b9aebcec13 chore: Modernize frontend
- Ditch gulp and move to rspack
 - Upgrade to node v20
2025-05-31 22:34:34 +02:00

25 lines
614 B
Bash
Executable File

#!/bin/bash
set -eu
source "$HOME/.local/bin/env"
export DJANGO_SETTINGS_MODULE=kassasite.settings
PROJECT_PATH=/var/www/neuf.no/kassa
PROCESS_NAME="kassa.neuf.no"
echo "Deploying kassa to ${PROJECT_PATH}"
cd "$PROJECT_PATH" || exit 1
git pull
# Frontend
bin/build-frontend
# Backend
uv sync
umask 022; uv run manage.py collectstatic --noinput -i node_modules -c # Collect static (including frontend)
uv run manage.py migrate # Run DB migrations
# Reload backend
echo "Reloading supervisor processes ${PROCESS_NAME} ${PROCESS_NAME}-celery"
sudo /usr/bin/supervisorctl pid "$PROCESS_NAME" | xargs kill -HUP