You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build(docker): add configs to speed up compose up/down/restart
1. In `package.json`, add `--abort-on-container-exit` flag to the npm `start` script. This ensures the `dynamodb-local` container is also killed when the `api` container is stopped, which ensures the db container's port is released and made available for subsequent `up` invocations. Without this, the next `up` will fail bc the port will be unavailable (unless additional action has been taken to free up the port).
2. In `package.json`, change the `start:dist` script to use the `start` script so it doesn't have to repeat the long `--abort-on-container-exit` docker compose flag.
3. In `docker-compose.yaml`, add `stop_grace_period: 2s` to the `api` container's configs. This overrides the default of `10s`, which is unnecessarily long and slows down container killing/restart.
0 commit comments