From 060ef4a42720eb8c2e24cdbb02a9cdf8afc9d511 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Sat, 12 Dec 2020 13:25:28 +0530 Subject: [PATCH] chore: Add steps for copying targets in linux VM (#1508) --- docs/deployment/production/linux-vm.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/deployment/production/linux-vm.md b/docs/deployment/production/linux-vm.md index 0aeb94b2c..39e507ab7 100644 --- a/docs/deployment/production/linux-vm.md +++ b/docs/deployment/production/linux-vm.md @@ -26,7 +26,7 @@ https://raw.githubusercontent.com/chatwoot/chatwoot/develop/deployment/setup_20. ```bash wget -O setup.sh chmod 755 setup.sh -./setup.sh +./setup.sh master ``` 2. Execute the script and it will take care of the initial **Chatwoot** setup. @@ -147,7 +147,21 @@ rake assets:precompile RAILS_ENV=production # Migrate the database schema RAILS_ENV=production bundle exec rake db:migrate +# Copy the updated targets +cp /home/chatwoot/chatwoot/deployment/chatwoot-web.1.service /etc/systemd/system/chatwoot-web.1.service +cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.1.service /etc/systemd/system/chatwoot-worker.1.service +cp /home/chatwoot/chatwoot/deployment/chatwoot.target /etc/systemd/system/chatwoot.target + # Restart the chatwoot server systemctl restart chatwoot.target +``` + +#### If precompile fails + +If the asset precompilation step fails with `ActionView::Template::Error (Webpacker can't find application.css in /home/chatwoot/chatwoot/public/packs/manifest.json)` or if you face issues while restarting the server, try the following command and restart the server. ``` +RAILS_ENV=production rake assets:clean assets:clobber assets:precompile +``` + +This command would clear the existing compiled assets and would recompile all the assets. Read more about it [here](https://edgeguides.rubyonrails.org/command_line.html#bin-rails-assets)