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
Out of convenience, when creating the API images, we bundle three py_binary target layers together. I think this doubled the size of our images (from ~180 to ~360MB), because we're bundling multiple Python environments.
Instead, we should restructure the image rule to take a single py_library for the API as a parameter. Then create a single py_binary, where:
We run wait_for_postgres
We pass the application to run on the CLI as the first argument (CMD)
We parse the input, and either run migrations, or start the API
That should reduce API container image sizes considerably (hopefully).
The text was updated successfully, but these errors were encountered:
Out of convenience, when creating the API images, we bundle three py_binary target layers together. I think this doubled the size of our images (from ~180 to ~360MB), because we're bundling multiple Python environments.
Instead, we should restructure the image rule to take a single
py_library
for the API as a parameter. Then create a singlepy_binary
, where:wait_for_postgres
That should reduce API container image sizes considerably (hopefully).
The text was updated successfully, but these errors were encountered: