-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
6 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,8 @@ | ||
#!/bin/bash -l | ||
set -e | ||
export NVM_DIR="$HOME/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # Load NVM | ||
|
||
set -o allexport | ||
source .env | ||
docker compose -f docker-compose.production.yml build | ||
docker compose -f docker-compose.production.yml up client | ||
docker compose -f docker-compose.production.yml down | ||
docker compose -f docker-compose.production.yml up router -d | ||
|
||
echo "=== Entering maintenance mode ===" | ||
cp ./assets/web/deploy.html ./offline.html | ||
|
||
echo "=== Updating repo ===" | ||
git pull | ||
|
||
echo "=== Updating node ===" | ||
|
||
cd og-injector | ||
echo "=== Updating OG Injector ===" | ||
nvm install | ||
corepack enable | ||
yarn install --immutable | ||
cd .. | ||
|
||
cd server | ||
echo "=== Updating server ===" | ||
rvm use | ||
|
||
bundle config set --local deployment 'true' | ||
bundle config set --local without 'development test' | ||
bundle install | ||
|
||
echo "=== Migrating Database ===" | ||
rails db:migrate | ||
|
||
bundle exec whenever --update-crontab | ||
cd .. | ||
|
||
cd client | ||
echo "=== Updating client ===" | ||
nvm install | ||
corepack enable | ||
yarn install --immutable | ||
|
||
echo "=== Building client ===" | ||
yarn build | ||
cd .. | ||
|
||
echo "=== Restarting Passenger ===" | ||
passenger-config restart-app $(pwd) | ||
|
||
rm ./offline.html | ||
echo "=== All Done ===" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM nginx:stable-alpine | ||
|
||
COPY ["server.conf", "/etc/nginx/conf.d/default.conf"] | ||
COPY ["nginx.conf", "/etc/nginx/conf.d/default.conf"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters