Commit 2503639a authored by HQ's avatar HQ
Browse files

Various improvements

parent 1e1f850f
#apt-add-repository -y ppa:brightbox/ruby-ng
#apt-get update
#apt-get -q -y --force-yes install ruby2.4 ruby2.4-dev
apt-add-repository -y ppa:brightbox/ruby-ng
apt-get update
apt-get -q -y --force-yes install ruby2.6 ruby2.6-dev
cp /var/discourse/config/discourse_defaults.conf /var/discourse/config/discourse.conf
perl -pi -e 's/db_host =.*/db_host = localhost/g' /var/discourse/config/discourse.conf
......@@ -19,8 +19,7 @@ perl -pi -e 's/development test profile/development production test profile/g' /
perl -pi -e 's/(.*config.serve_static_files.+)/\#$1/g' /var/discourse/config/environments/production.rb
apt-get install -y npm
npm install -g svgo
ln -s /usr/bin/nodejs /usr/bin/node
npm install -g svgo@0.7.2
perl -pi -e 's/inet_protocols =.*/inet_protocols = ipv4/;' /etc/postfix/
......@@ -53,8 +52,10 @@ development:
mkdir -p /var/discourse/tmp/sockets
mkdir -p /var/discourse/tmp/pids
gem install bundler
cd /var/discourse ; bundle install
cd /var/discourse
#gem install bundler
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
bundle install
echo "export RAILS_ENV=production" >> /etc/bash.bashrc
# Remove tabs from Webmin UI
......@@ -259,8 +259,8 @@ if (!$rebuild && -e "$cwd/$dname.master.qcow2") { # Master image already exists,
print `rm /tmp/$dname/etc/resolv.conf`;
print `echo "nameserver" > /tmp/$dname/etc/resolv.conf`;
# Add user stabile
print `chroot "/tmp/$dname" useradd stabile -b /home -s /bin/bash`;
print `chroot "/tmp/$dname" mkdir /home/stabile`;
print `chroot "/tmp/$dname" useradd stabile -b /home -s /bin/bash 2>/dev/null`;
print `chroot "/tmp/$dname" mkdir /home/stabile 2>/dev/null`;
print `chroot "/tmp/$dname" chown stabile:stabile /home/stabile`;
# Run pre exec script
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment