Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

データベース周りの改善 #2

Open
sudachi0114 opened this issue Mar 17, 2021 · 0 comments
Open

データベース周りの改善 #2

sudachi0114 opened this issue Mar 17, 2021 · 0 comments

Comments

@sudachi0114
Copy link
Owner

sudachi0114 commented Mar 17, 2021

  • データベースへのコネクションチェックの改善

    • 現在はタイミング頼り
      • 一応対応はしている
        • docker-compose.ymlappdepends_on: db を指定することで db コンテナ立ち上がる -> アプリケーションのコンテナが立ち上がる、という定義になっている。
        • ref: コンテナ起動時間の改善 #1 (comment)
      • しかし、コンテナ内での「サービスの開始」に関してはタイミング頼り
  • コネクションをいろんなところで張ってるの直したい

    • create とか read の度に DB コネクションするのムダっぽくて改善したい
  • マイグレーションの改善

    • 現在 Makefile から tools/db/migrate.go を実行することで、データベースコンテナ内で動いているデータベースサービスのマイグレーションを行っているが..これで本当に良いだろうか??
    • 方針
    • このままで良い (理由..)
    • 所望のテーブルを作成する sql を書いて、コンテナ内でデータベースサービスが起動時に自動実行させる (そういうことができるエントリポイントがあったような..)
@sudachi0114 sudachi0114 changed the title マイグレーションの改善 データベース周りの改善 Mar 18, 2021
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

No branches or pull requests

1 participant