Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Exclude static files from Flask container image #218

Open
esheehan-gsl opened this issue Mar 7, 2023 · 0 comments
Open

Exclude static files from Flask container image #218

esheehan-gsl opened this issue Mar 7, 2023 · 0 comments
Labels
maintenance shaping Status for project issues that are still being discussed

Comments

@esheehan-gsl
Copy link
Contributor

Problem

When we deploy our containers, we host all of our static assets (JS and CSS) from the nginx container that has a reverse proxy to the Flask container. But when we build the container for the Flask app, we still copy the static files from the source code into the container.

Solution

If we’re using BuildKit, we can have separate ignore files for each of the Dockerfiles we have.

We will probably want to rename our docker files accordingly:

  • services/api/Dockerfile ➡️ services/api/app.Dockerfile with services/api/app.Dockerfile.dockerignore
  • services/api/Dockerfile-webserver ➡️ services/api/webserver.Dockerfile with services/api/webserver.Dockerfile.ignore

It may be worth considering moving all of our Docker config into a separate directory in the project root instead of living alongside each service…

@esheehan-gsl esheehan-gsl added project shaping Status for project issues that are still being discussed labels Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintenance shaping Status for project issues that are still being discussed
Projects
None yet
Development

No branches or pull requests

1 participant