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
Dockerfile 1 provides an environment with consistent tools so that we can build the main webapp service. But the deployment of the webapp does not use Dockerfile when running. Like the other two services. Instead, it relies on buildpacks to build the executable on deploy.
Dockerfile 2 builds the image for the search cache service
Dockerfile 3 builds the image for the results processor service.
Problem
Sometimes when we upgrade Dockerfile 1, the PR is unable to deploy the webapp. This is mainly due to the fact the deployment always pulls from the :latest tag instead of the newly built image tag for that PR.
Suggestion
Make Dockerfile 2 a common Go Dockerfile that both search cache and the webapp use. And we can use Dockerfile arguments to specify at build time which binary to build in this Go Dockerfile. (Can look at this Dockerfile for inspiration. It should be simpler since we don't use multiple Go modules). After doing this, we would need to change the runtime in both prod and staging app.yaml files from go1xx to custom like we do for the search cache service.
Out of scope for this issue but something to consider in a separate issue
Should the Dockerfile in the root of the repository be changed to use devcontainer
The text was updated successfully, but these errors were encountered:
Background
Currently, we have three Dockerfiles:
Dockerfile 1 provides an environment with consistent tools so that we can build the main
webapp
service. But the deployment of the webapp does not use Dockerfile when running. Like the other two services. Instead, it relies on buildpacks to build the executable on deploy.Dockerfile 2 builds the image for the
search cache
serviceDockerfile 3 builds the image for the
results processor
service.Problem
Sometimes when we upgrade Dockerfile 1, the PR is unable to deploy the webapp. This is mainly due to the fact the deployment always pulls from the
:latest
tag instead of the newly built image tag for that PR.Suggestion
Make Dockerfile 2 a common Go Dockerfile that both search cache and the webapp use. And we can use Dockerfile arguments to specify at build time which binary to build in this Go Dockerfile. (Can look at this Dockerfile for inspiration. It should be simpler since we don't use multiple Go modules). After doing this, we would need to change the runtime in both prod and staging app.yaml files from go1xx to custom like we do for the search cache service.
Out of scope for this issue but something to consider in a separate issue
Should the Dockerfile in the root of the repository be changed to use devcontainer
The text was updated successfully, but these errors were encountered: