You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hal Seki edited this page Oct 14, 2017
·
2 revisions
How to deploy application to production server
Normally, please push production branch to this repository.
CircleCI will publish the latest production code to the production server.
You can check the publish log here.
During the process, the CI will run
pull the latest production branch
bundle install
migrate database
precompile assets
run db:seed task
restart unicorn
Run rake tasks using capistrano from Docker host
If you want to run rake tasks on the server, below steps will be needed.
Ask owners to add your public key to the host server.
Copy your id_rsa file to (PROJECT_ROOT)/.ssh/id_rsa
cp ~/.ssh/id_rsa ./.ssh/
( ./.ssh/id_rsa is in .gitignore )
Run capistrano task via docker-compose command
docker-compose exec app bundle exec cap production deploy:graydb_import
The task should be written in condig/deploy.rb
Run rails related commands on the production server
login to the production server
move to the project directory
cd /var/www/codeforelection_front/current
run run_rails_cmd.sh with commands you want to run