Deployment Guide
デプロイガイド
Section titled “デプロイガイド”本ガイドでは、アプリケーションのデプロイ手順について説明します.
使用するサーバー
Section titled “使用するサーバー”- ConoHa VPS
- Debian 11
必要なソフトウェア
Section titled “必要なソフトウェア”- Ruby
- Docker
- サーバーへのSSHアクセス(root) TODO: ユーザー権限でのアクセスに変更予定
kamalを使用してデプロイを行います.
url: https://guide.suubutsuseminar.com
- アプリケーションサーバー: Dockerコンテナ上で動作 (rs-textbook-guide-web-production-<commit-hash>)
- DBサーバー: Dockerコンテナ上で動作 (rs-textbook-guide-postgres)
staging環境
Section titled “staging環境”url: https://guide-stg.suubutsuseminar.com
- アプリケーションサーバー: Dockerコンテナ上で動作 (rs-textbook-guide-web-staging-<commit-hash>)
- DBサーバー: Dockerコンテナ上で動作 (rs-textbook-guide-postgres-staging)
プロキシサーバー: kamal-proxy
デプロイ手順
Section titled “デプロイ手順”デプロイは以下の手順で行います。
- mainブランチの最新コードを取得
- staging環境へデプロイ
- 動作確認
- 本番環境へデプロイ
staging環境へのデプロイ
Section titled “staging環境へのデプロイ”動作確認用のstaging環境へのデプロイ手順です。 (TODO: workflow自動化予定)
staging環境へは https://guide-stg.suubutsuseminar.com からアクセスできます。 ベーシック認証のユーザー名とパスワードは、別途共有します。
最初のデプロイ
Section titled “最初のデプロイ”./setup_staging.sh2回目以降のデプロイ
Section titled “2回目以降のデプロイ”./deploy_staging.sh変更点を中心に動作確認を行ってください staging環境のDBは本番環境のDBとは別環境です. DB操作が必要な場合, staging環境で操作及び結果の確認を行ってください.
本番環境へのデプロイ
Section titled “本番環境へのデプロイ”動作確認が完了したら、本番環境へデプロイします。
最初のデプロイ
Section titled “最初のデプロイ”./setup_production.sh2回目以降のデプロイ
Section titled “2回目以降のデプロイ”./deploy_production.sh