mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #1341 from gradido/production_deployment
production_deployment
This commit is contained in:
commit
4e64a1eb11
@ -6,11 +6,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||||
|
// 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(
|
await queryFn(
|
||||||
'ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;',
|
'ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||||
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;')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,12 +50,12 @@ sudo nano /etc/sudoers.d/gradido
|
|||||||
sudo chmod a+rw /etc/nginx/sites-enabled
|
sudo chmod a+rw /etc/nginx/sites-enabled
|
||||||
|
|
||||||
# Install node 16.x
|
# Install node 16.x
|
||||||
|
sudo apt-get install -y curl
|
||||||
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
||||||
sudo apt-get install -y nodejs
|
sudo apt-get install -y nodejs
|
||||||
sudo apt-get install -y build-essential
|
sudo apt-get install -y build-essential
|
||||||
|
|
||||||
# Install yarn
|
# Install yarn
|
||||||
sudo apt-get install -y curl
|
|
||||||
sudo apt-get install -y gnupg
|
sudo apt-get install -y gnupg
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
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
|
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
|
> Please read the Terms of Service at > Y
|
||||||
> Would you be willing, once your first certificate is successfully issued, to > N
|
> 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
|
> 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
|
# 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
|
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 mv $SCRIPT_DIR/logrotate/gradido.conf /etc/logrotate.d/gradido.conf
|
||||||
sudo chown root:root /etc/logrotate.d/gradido.conf
|
sudo chown root:root /etc/logrotate.d/gradido.conf
|
||||||
|
|||||||
@ -73,9 +73,9 @@
|
|||||||
> sudo /etc/init.d/fail2ban restart
|
> sudo /etc/init.d/fail2ban restart
|
||||||
|
|
||||||
# Install gradido
|
# Install gradido
|
||||||
> sudo apt-get install git
|
> sudo apt-get install -y git
|
||||||
|
> cd ~
|
||||||
> git clone https://github.com/gradido/gradido.git
|
> git clone https://github.com/gradido/gradido.git
|
||||||
> cd gradido/deployment/bare_metal
|
|
||||||
|
|
||||||
# Timezone
|
# Timezone
|
||||||
# Note: This is not needed - UTC(default) is REQUIRED for production data
|
# Note: This is not needed - UTC(default) is REQUIRED for production data
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user