2019-12-08 22:43:49 +01:00
|
|
|
#! /bin/bash
|
|
|
|
# A utility that will install the latest version of the code in the repo
|
|
|
|
# to your virtualenv, run any upgrade scripts to update your production
|
|
|
|
# MySQL instance and then preload the JSX cache. Effectively, a one-liner
|
|
|
|
# to deploying a new version.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
pushd /path/to/git/checkout
|
|
|
|
source /path/to/your/virtualenv/bin/activate
|
2023-08-20 21:35:06 +02:00
|
|
|
|
|
|
|
# Install dependencies, install this library.
|
2019-12-08 22:43:49 +01:00
|
|
|
pip install --upgrade pip
|
|
|
|
pip install . -U --force-reinstall
|
|
|
|
|
2023-08-20 21:35:06 +02:00
|
|
|
# Copy the WSGI files over the old ones, recompile JSX.
|
|
|
|
cp bemani/wsgi/*.wsgi /path/to/your/wsgi/files
|
|
|
|
./jsx --output-directory /path/to/static/jsx/directory
|
|
|
|
|
|
|
|
# Perform DB schema migrations
|
2019-12-08 22:43:49 +01:00
|
|
|
./dbutils --config /path/to/your/root/server.yaml upgrade
|
2023-08-20 21:35:06 +02:00
|
|
|
|
2019-12-08 22:43:49 +01:00
|
|
|
deactivate
|
|
|
|
popd
|
2023-08-20 21:35:06 +02:00
|
|
|
|
2019-12-08 22:43:49 +01:00
|
|
|
sudo service uwsgi restart && ./preload
|