Skip to content

Update the management tools for development and production env#134

Merged
hirata0813 merged 2 commits intonomlab:mainfrom
miyake13000:dev2
May 14, 2025
Merged

Update the management tools for development and production env#134
hirata0813 merged 2 commits intonomlab:mainfrom
miyake13000:dev2

Conversation

@miyake13000
Copy link
Copy Markdown
Contributor

概要

  1. Rails7 へのアップデートに伴い必要なくなった Webpacker 等の不要ファイルを削除した.
  2. 開発環境,および本番環境用のコンテナの作成手順,管理用スクリプト等を更新した.

使用上の変更点

  1. 開発環境は make up のみでコンテナの作成,起動するようになった.
  2. 開発環境でテストを行うコマンドを make rails-test から make test に変更した.
  3. 本番環境のコンテナを作成するコマンドを scripts/setup-docker.sh から scripts/setup-production-container.sh に変更した.
  4. 本番環境のコンテナを管理するスクリプトを scripts/rask-docker.sh から bin/launch-production に変更した.
  5. 上記2つの変更に伴い,systemd 管理用のサービスファイルを更新した.

内部的な変更

  1. 本番環境用の Dockerfile を rails 公式が提供するものに更新した.これにより,セットアップ手順がこれまでより短縮された.
  2. 開発環境用の Dockerfike についても,本番環境用のものをカスタマイズしたものに変更した.これにより,ファイルのオーナーが root になる問題が解決される.
  3. 本番環境のコンテナの管理に docker compose を使うように変更した.
  4. Rails 7 への更新に伴い,production 環境用の設定が一部機能していなかった問題を解決した.
    1. config/database.yml に production 環境用のデータベースを storage/production.sqlite3 として作成するように変更
    2. config/environment/production.rb で,config.force_ssl=false に変更
  5. その他,各種スクリプトにおけるバグの修正

@hirata0813 hirata0813 merged commit 29cbe61 into nomlab:main May 14, 2025
1 check passed
@miyake13000 miyake13000 deleted the dev2 branch May 14, 2025 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants