Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I don't quite understand everything that's going on here, but this
will get main deployable again.
Summary: the production Docker image build does not put a prebuilt
binary for the
sqlite3
package into the image, ever since I addedsqlite3@^5.1.5
as an explicit dependency in #488. I don't know why.The package was already being installed (as a dependency of
fastify-sqlite
) but adding the explicit dependency somehow changedhow it gets installed.
Upping the dependency to 5.1.7 fixes the problem. It causes 5.1.5 to
be installed within
node_modules/fastify-sqlite/node_modules
in theprod image, with the prebuilt binary present. (5.1.7 is not installed
in the prod image at all, as I'd expect, since it's under
devDependencies
.)I'm also adding
--frozen-lockfile
to the yarn invocations in theDockerfile; I don't think they're strictly necessary (and they're
definitely not necessary to fix this), but that should eliminate one
other possible source of confusion/problems, especially while
debugging weird issues like this.
Test Plan
Run the server with
yarn dev
; make test requests and ensure they succeed.Run:
docker build -t incentives-api:latest .
docker run --rm -it -p 8080:8080 incentives-api:latest