This repository was archived by the owner on Jul 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Deployment
Hal Seki edited this page Oct 14, 2017
·
2 revisions
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
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
-
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
./run_rails_cmd.sh rake graydb:import