Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using a separate docker container between the app and development environment #4029

Open
jcscottiii opened this issue Oct 6, 2024 · 1 comment

Comments

@jcscottiii
Copy link
Collaborator

Background

Currently, we have three Dockerfiles:

  1. https://github.com/web-platform-tests/wpt.fyi/blob/main/Dockerfile
  2. https://github.com/web-platform-tests/wpt.fyi/blob/main/api/query/cache/service/Dockerfile
  3. https://github.com/web-platform-tests/wpt.fyi/blob/main/results-processor/Dockerfile

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

@jcscottiii
Copy link
Collaborator Author

Actually this may not be as straight forward:

https://issuetracker.google.com/issues/286782972

App Engine does not currently support passing the build argument. Instead, there's a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant