mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
fix bugs
This commit is contained in:
parent
26d8221426
commit
30b03b24a2
@ -50,7 +50,7 @@ DEPLOY_SEED_DATA=false
|
||||
# test email
|
||||
# if true all email will be send to EMAIL_TEST_RECEIVER instead of email address of user
|
||||
EMAIL_TEST_MODUS=false
|
||||
EMAIL_TEST_RECEIVER=test_team@gddhost.tld
|
||||
EMAIL_TEST_RECEIVER=test_team@gradido.net
|
||||
|
||||
# webhook for auto update on github repository changes
|
||||
WEBHOOK_GITHUB_BRANCH=master
|
||||
@ -103,6 +103,7 @@ META_AUTHOR="Bernd Hückstädt - Gradido-Akademie"
|
||||
# externe gradido services
|
||||
|
||||
GDT_ACTIVE=false
|
||||
GDT_API_URL=https://gdt.gradido.net
|
||||
|
||||
# DLT-Connector (still in develop)
|
||||
# verify transaction additional via gradido blockchain
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# source profile so PATH/NVM/BUN werden gesetzt (safe for non-login)
|
||||
if [ -f /home/gradido/.profile ]; then
|
||||
. /home/gradido/.profile
|
||||
fi
|
||||
# Ensure required tools are installed
|
||||
|
||||
# make sure correct node version is installed
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
if ! command -v nvm > /dev/null
|
||||
then
|
||||
echo "'nvm' is missing, will be installed now!"
|
||||
@ -14,7 +15,7 @@ install_nvm() {
|
||||
nvm install
|
||||
nvm use
|
||||
nvm alias default
|
||||
npm i -g yarn pm2
|
||||
npm i -g pm2 turbo
|
||||
pm2 startup
|
||||
}
|
||||
nvm use || install_nvm
|
||||
@ -52,7 +53,7 @@ fi
|
||||
if ! command -v turbo > /dev/null
|
||||
then
|
||||
echo "'turbo' is missing, will be installed now!"
|
||||
bun install --global turbo
|
||||
npm i -g turbo
|
||||
fi
|
||||
|
||||
# rust and grass
|
||||
|
||||
@ -2,6 +2,11 @@
|
||||
# stop if something fails
|
||||
set -euo pipefail
|
||||
|
||||
# source profile so PATH/NVM/BUN werden gesetzt (safe for non-login)
|
||||
if [ -f /home/gradido/.profile ]; then
|
||||
. /home/gradido/.profile
|
||||
fi
|
||||
|
||||
# check for parameter
|
||||
FAST_MODE=false
|
||||
POSITIONAL_ARGS=()
|
||||
|
||||
@ -210,11 +210,17 @@ sudo systemctl daemon-reload
|
||||
# setup https with certbot
|
||||
certbot certonly --nginx --non-interactive --agree-tos --domains $COMMUNITY_HOST --email $COMMUNITY_SUPPORT_MAIL
|
||||
|
||||
export NVM_DIR="/home/gradido/.nvm"
|
||||
BUN_VERSION_FILE="$PROJECT_ROOT/.bun-version"
|
||||
if [ ! -f "$BUN_VERSION_FILE" ]; then
|
||||
echo ".bun-version file not found at: $BUN_VERSION_FILE"
|
||||
exit 1
|
||||
fi
|
||||
export BUN_VERSION="$(cat "$BUN_VERSION_FILE" | tr -d '[:space:]')"
|
||||
export BUN_INSTALL="/home/gradido/.bun"
|
||||
|
||||
# run as gradido user (until EOF)
|
||||
sudo -u gradido bash <<'EOF'
|
||||
export NVM_DIR="/home/gradido/.nvm"
|
||||
NODE_VERSION="v18.20.7"
|
||||
export NVM_DIR
|
||||
sudo -u gradido bash <<EOF
|
||||
# Install nvm if it doesn't exist
|
||||
if [ ! -d "$NVM_DIR" ]; then
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
@ -223,28 +229,18 @@ sudo -u gradido bash <<'EOF'
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
|
||||
# Install Node if not already installed
|
||||
if ! nvm ls $NODE_VERSION >/dev/null 2>&1; then
|
||||
nvm install $NODE_VERSION
|
||||
if ! nvm ls >/dev/null 2>&1; then
|
||||
nvm install
|
||||
fi
|
||||
|
||||
BUN_VERSION_FILE="$PROJECT_ROOT/.bun-version"
|
||||
if [ ! -f "$BUN_VERSION_FILE" ]; then
|
||||
echo ".bun-version file not found at: $BUN_VERSION_FILE"
|
||||
exit 1
|
||||
fi
|
||||
BUN_VERSION="$(cat "$BUN_VERSION_FILE" | tr -d '[:space:]')"
|
||||
echo "'bun' v$BUN_VERSION will be installed now!"
|
||||
curl -fsSL https://bun.com/install | bash -s "bun-v${BUN_VERSION}"
|
||||
|
||||
# Load bun
|
||||
export BUN_INSTALL="$HOME/.bun"
|
||||
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||
|
||||
# Install pm2 and turbo
|
||||
bun add -g pm2 turbo
|
||||
npm i -g pm2 turbo
|
||||
|
||||
echo "'bun' v$BUN_VERSION will be installed now!"
|
||||
curl -fsSL https://bun.com/install | bash -s "bun-v${BUN_VERSION}"
|
||||
EOF
|
||||
|
||||
# Load bun
|
||||
export BUN_INSTALL="$HOME/.bun"
|
||||
export BUN_INSTALL="/home/gradido/.bun"
|
||||
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||
|
||||
# Load nvm
|
||||
@ -302,5 +298,4 @@ chown -R gradido:gradido $PROJECT_ROOT
|
||||
sudo -u gradido crontab < $LOCAL_SCRIPT_DIR/crontabs.txt
|
||||
|
||||
# Start gradido
|
||||
# Note: on first startup some errors will occur - nothing serious
|
||||
sudo -u gradido $SCRIPT_PATH/start.sh $1
|
||||
Loading…
x
Reference in New Issue
Block a user