Commit 3f919d3
committed
db-init・db-migrateが起動のたびに匿名ボリュームを作るのをやめる
ベースのpostgres公式イメージが VOLUME /var/lib/postgresql/data を宣言しているため、
そこに何もマウントしていない db-init・db-migrate では、コンテナを作るたびに空の
匿名ボリュームが1つずつ作られて溜まっていた(db本体はbindマウントを当てているので
発生しない)。どちらのサービスもPGDATAは使わず psql クライアントとしてしか
動かないので、使い捨てのtmpfsを当てて抑止する。
3つのcomposeファイル(本番・開発・standalone)に同じ対処を入れた。
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent b69ccdd commit 3f919d3
3 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| |||
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| |||
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| |||
0 commit comments