chore: Update ruby and docker base image to 3.0.4 (#4693)

* chore: Update ruby version to 3.0.4

* chore: update ruby version in docker workflow

* chore: update ruby version to 3.1.2

* Upgrade vue-jest to remove deasync

* Revert to 3.0.4 to see if deasync issue is fixed

* fix: script failure if pg/redis not opted in

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Vishnu Narayanan
2022-05-27 17:33:24 +05:30
committed by GitHub
parent 50d2dbd462
commit 568c30e93e
12 changed files with 209 additions and 207 deletions

View File

@@ -16,10 +16,10 @@ KillMode=mixed
StandardInput=null
SyslogIdentifier=%p
Environment="PATH=/home/chatwoot/.rvm/gems/ruby-3.0.2/bin:/home/chatwoot/.rvm/gems/ruby-3.0.2@global/bin:/home/chatwoot/.rvm/rubies/ruby-3.0.2/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin"
Environment="PATH=/home/chatwoot/.rvm/gems/ruby-3.0.4/bin:/home/chatwoot/.rvm/gems/ruby-3.0.4@global/bin:/home/chatwoot/.rvm/rubies/ruby-3.0.4/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin"
Environment="PORT=3000"
Environment="RAILS_ENV=production"
Environment="NODE_ENV=production"
Environment="RAILS_LOG_TO_STDOUT=true"
Environment="GEM_HOME=/home/chatwoot/.rvm/gems/ruby-3.0.2"
Environment="GEM_PATH=/home/chatwoot/.rvm/gems/ruby-3.0.2:/home/chatwoot/.rvm/gems/ruby-3.0.2@global"
Environment="GEM_HOME=/home/chatwoot/.rvm/gems/ruby-3.0.4"
Environment="GEM_PATH=/home/chatwoot/.rvm/gems/ruby-3.0.4:/home/chatwoot/.rvm/gems/ruby-3.0.4@global"

View File

@@ -16,10 +16,10 @@ KillMode=mixed
StandardInput=null
SyslogIdentifier=%p
Environment="PATH=/home/chatwoot/.rvm/gems/ruby-3.0.2/bin:/home/chatwoot/.rvm/gems/ruby-3.0.2@global/bin:/home/chatwoot/.rvm/rubies/ruby-3.0.2/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin"
Environment="PATH=/home/chatwoot/.rvm/gems/ruby-3.0.4/bin:/home/chatwoot/.rvm/gems/ruby-3.0.4@global/bin:/home/chatwoot/.rvm/rubies/ruby-3.0.4/bin:/home/chatwoot/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/chatwoot/.rvm/bin:/home/chatwoot/.rvm/bin"
Environment="PORT=3000"
Environment="RAILS_ENV=production"
Environment="NODE_ENV=production"
Environment="RAILS_LOG_TO_STDOUT=true"
Environment="GEM_HOME=/home/chatwoot/.rvm/gems/ruby-3.0.2"
Environment="GEM_PATH=/home/chatwoot/.rvm/gems/ruby-3.0.2:/home/chatwoot/.rvm/gems/ruby-3.0.2@global"
Environment="GEM_HOME=/home/chatwoot/.rvm/gems/ruby-3.0.4"
Environment="GEM_PATH=/home/chatwoot/.rvm/gems/ruby-3.0.4:/home/chatwoot/.rvm/gems/ruby-3.0.4@global"

View File

@@ -43,8 +43,8 @@ RAILS_ENV=production
sudo -i -u chatwoot << EOF
rvm --version
rvm autolibs disable
rvm install "ruby-3.0.2"
rvm use 3.0.2 --default
rvm install "ruby-3.0.4"
rvm use 3.0.4 --default
git clone https://github.com/chatwoot/chatwoot.git
cd chatwoot

View File

@@ -7,7 +7,8 @@
set -eu -o pipefail
trap exit_handler EXIT
pg_pass=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 15 ; echo '')
function exit_handler() {
if [ "$?" -ne 0 ]; then
echo -en "\nSome error has occured. Check '/var/log/chatwoot-setup.log' for details.\n"
@@ -77,8 +78,7 @@ function configure_rvm() {
}
function configure_db() {
pg_pass=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 15 ; echo '')
sudo -i -u postgres psql << EOF
sudo -i -u postgres psql << EOF
\set pass `echo $pg_pass`
CREATE USER chatwoot CREATEDB;
ALTER USER chatwoot PASSWORD :'pass';
@@ -103,8 +103,8 @@ function setup_chatwoot() {
sudo -i -u chatwoot << EOF
rvm --version
rvm autolibs disable
rvm install "ruby-3.0.2"
rvm use 3.0.2 --default
rvm install "ruby-3.0.4"
rvm use 3.0.4 --default
git clone https://github.com/chatwoot/chatwoot.git
cd chatwoot
@@ -236,7 +236,7 @@ EOF
configure_systemd_services &>> "${LOG_FILE}"
public_ip=$(curl http://checkip.amazonaws.com -s)
if [ "$configure_webserver" != "yes" ]
then
cat << EOF
@@ -245,7 +245,7 @@ EOF
Woot! Woot!! Chatwoot server installation is complete.
The server will be accessible at http://$public_ip:3000
To configure a domain and SSL certificate, follow the guide at
To configure a domain and SSL certificate, follow the guide at
https://www.chatwoot.com/docs/deployment/deploy-chatwoot-in-linux-vm
Join the community at https://chatwoot.com/community