🔧 Build frontend on deploy
This commit is contained in:
1 parent
f4749e6a6e
commit
53ef262ba4
3 files changed
+14
-1
No files matched your search
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
cd frontend
|
||||||
|
npm i
|
||||||
|
npm run build
|
||||||
+6
-1
@@ -6,10 +6,15 @@ PROCESS_NAME="bbs.neuf.no"
|
|||||||
echo "Deploying bbs to ${PROJECT_PATH}"
|
echo "Deploying bbs to ${PROJECT_PATH}"
|
||||||
cd "$PROJECT_PATH" || exit 1
|
cd "$PROJECT_PATH" || exit 1
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
|
# Backend
|
||||||
poetry install
|
poetry install
|
||||||
umask 022; poetry run python manage.py collectstatic --noinput # Collect static
|
umask 022; poetry run python manage.py collectstatic --noinput # Collect static
|
||||||
poetry run python manage.py migrate # Run DB migrations
|
poetry run python manage.py migrate # Run DB migrations
|
||||||
|
|
||||||
# Reload
|
# Frontend
|
||||||
|
bin/build-frontend
|
||||||
|
|
||||||
|
# Reload backend
|
||||||
echo "Reloading supervisor process ${PROCESS_NAME}"
|
echo "Reloading supervisor process ${PROCESS_NAME}"
|
||||||
sudo /usr/bin/supervisorctl pid "$PROCESS_NAME" | xargs kill -HUP
|
sudo /usr/bin/supervisorctl pid "$PROCESS_NAME" | xargs kill -HUP
|
||||||
@@ -1 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
cd frontend && npm run start
|
cd frontend && npm run start
|
||||||
|
|
||||||
Reference in new issue
Block a user