Commit e77bfae
committed
fix: add restart policy to MongoDB container for flaky CI starts
MongoDB's official Docker entrypoint uses a two-phase startup: a
temporary mongod for user/db init, then the real mongod. Under CI
resource pressure the port may not be released between the two
phases, causing mongod to exit with code 48 (address already in use).
Adding restart: on-failure:3 lets Docker handle the transient failure
natively. On restart the data directory already exists so the
entrypoint skips the two-phase init entirely, avoiding the race.1 parent 8fcba8b commit e77bfae
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
| 1291 | + | |
1291 | 1292 | | |
1292 | 1293 | | |
1293 | 1294 | | |
| |||
0 commit comments