Kawaii Lab

プログラミングとかサービス開発とか

今日の進捗はRailsの自動CI/CDフローを整備した

以下の二つを達成した

  • devブランチにマージしたらdevサーバーにリリース
  • masterブランチにマージしたらstgサーバーにリリース

herokuだとpostgres DBしか使えなかったのでDBの変更もした。 記事によっては開発環境はSQLite3でherokuはpostgresが多かったのだが、環境構成が違うとトラブルになりがちで,余計な手間が増えるのでここはpostgresに統一した。

後学のためにRailsとCircleCI,Herokuの連携のために読んでおくべき記事を載せておく

Database Configuration Examples - CircleCI

Getting Started on Heroku with Rails 5.x | Heroku Dev Center

Circle CI 2.1 templates for deploying Ruby on Rails to Heroku with Ruby 2.6.0 and Node. This config deploys `develop` to staging and `master` to production. · GitHub

Next Action

Docker環境の整備