diff --git a/database/migrations/0006-login_users_collation.ts b/database/migrations/0006-login_users_collation.ts index 579bb0a7a..2a730f5e7 100644 --- a/database/migrations/0006-login_users_collation.ts +++ b/database/migrations/0006-login_users_collation.ts @@ -6,11 +6,13 @@ */ export async function upgrade(queryFn: (query: string, values?: any[]) => Promise>) { + // Explicitly change the charset and collate to the one used to then change it + await queryFn('ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;') await queryFn( 'ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;', ) } export async function downgrade(queryFn: (query: string, values?: any[]) => Promise>) { - await queryFn('ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8mb4;') + await queryFn('ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;') } diff --git a/deployment/bare_metal/install.sh b/deployment/bare_metal/install.sh index b6ea5cd78..caa9c1240 100755 --- a/deployment/bare_metal/install.sh +++ b/deployment/bare_metal/install.sh @@ -50,12 +50,12 @@ sudo nano /etc/sudoers.d/gradido sudo chmod a+rw /etc/nginx/sites-enabled # Install node 16.x +sudo apt-get install -y curl curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt-get install -y nodejs sudo apt-get install -y build-essential # Install yarn -sudo apt-get install -y curl sudo apt-get install -y gnupg curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list @@ -75,9 +75,11 @@ sudo certbot > Please read the Terms of Service at > Y > Would you be willing, once your first certificate is successfully issued, to > N > No names were found in your configuration files. Please enter in your domain > stage1.gradido.net +# Note: this will throw an error regarding not beeing able to identify the nginx corresponding +# config but produce the required certificate - thats perfectly fine this way # Install logrotate -# sudo apt-get install -y logrotate +sudo apt-get install -y logrotate envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $SCRIPT_DIR/logrotate/gradido.conf.template > $SCRIPT_DIR/logrotate/gradido.conf sudo mv $SCRIPT_DIR/logrotate/gradido.conf /etc/logrotate.d/gradido.conf sudo chown root:root /etc/logrotate.d/gradido.conf diff --git a/deployment/bare_metal/setup.md b/deployment/bare_metal/setup.md index a23d3fbe4..55f657df2 100644 --- a/deployment/bare_metal/setup.md +++ b/deployment/bare_metal/setup.md @@ -73,9 +73,9 @@ > sudo /etc/init.d/fail2ban restart # Install gradido -> sudo apt-get install git +> sudo apt-get install -y git +> cd ~ > git clone https://github.com/gradido/gradido.git -> cd gradido/deployment/bare_metal # Timezone # Note: This is not needed - UTC(default) is REQUIRED for production data