Skip to content

Conversation

@dlwr
Copy link
Contributor

@dlwr dlwr commented Jan 15, 2026

Summary

Add configuration files for deploying the application to Fly.io with SQLite.

Changes

  1. Production Dockerfile

    • Multi-stage build for smaller image size
    • Non-root user for security
    • Includes docker-entrypoint for DB preparation
  2. Fly.io configuration (fly.toml)

    • Tokyo region (nrt)
    • SQLite persistent volume at /rails/storage
    • Auto-stop/start machines for cost saving
  3. Database configuration

    • Use SQLite for production (instead of Turso)
  4. Security

    • Add credentials key files to .gitignore

Deployment

fly secrets set RAILS_MASTER_KEY=<your-master-key>
fly deploy

概要

Fly.io に SQLite を使ってアプリケーションをデプロイするための設定ファイルを追加します。

変更内容

  1. 本番用 Dockerfile

    • マルチステージビルドでイメージサイズを削減
    • セキュリティのため非 root ユーザーで実行
    • DB 準備用の docker-entrypoint を含む
  2. Fly.io 設定 (fly.toml)

    • 東京リージョン (nrt)
    • SQLite 永続化ボリューム (/rails/storage)
    • コスト削減のための自動停止・起動
  3. データベース設定

    • 本番環境で SQLite を使用(Turso から変更)
  4. セキュリティ

    • credentials key ファイルを .gitignore に追加

デプロイ方法

fly secrets set RAILS_MASTER_KEY=<your-master-key>
fly deploy

@dlwr
Copy link
Contributor Author

dlwr commented Jan 15, 2026

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