-
Notifications
You must be signed in to change notification settings - Fork 203
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
Embed the production run command in the dockerfile rather than relying on ECS to override it #2785
Comments
Reopening the issue to track the required infrastructure work. We will close this once the changes to the infrastructure described in the issue are deployed. |
The API task definition templates are updated and I am triggering a production redeployment now. That will officially close this issue. API: https://github.com/WordPress/openverse-infrastructure/actions/runs/5920419471 Both of the above links require access to the private infrastructure repository. |
@dhruvkb Before deploying the API this week, can you update the task definition templates by applying |
@sarayourfriend ACK. Thanks for the heads up. Why does the API deploy need Update: the API deployment on Tuesday (22 Aug 2023) was completed without a |
Dhruv and I spoke about this and we changed the approach. Now that the API is deployed to production with the image that has the baked in run command, we can deploy this change in Terraform again without causing the issues we saw earlier. I'll do that today. |
Applied and deployed to production, this work is finished. |
Problem
Stems from #2566
Currently, the API dockerfile embeds the local dev run command rather than the production command. This makes it difficult to deploy changes to the production runtime command because we need to do it in two (three) steps instead of one. Under the current approach, if we need to make a significant change to the API live environment command, we need to do the following:
Description
We can significantly simplify this by embedding the production run command in the image. This doesn't completely solve the problem, as there are still relevant variables that are only present in the task definition (such as CPU, relevant to worker count) but it eliminates the more likely scenario where we're just changing some settings on the run command (or switching runners, e.g., for ASGI conversion).
To complete this ticket:
command: python manage.py runserver 0.0.0.0:8000
to theweb
service in the docker-compose.ymlRUN
inapi/Dockerfile
for the Django image toRUN ["gunicorn"]
Afterwards, we must also remove
command
from the API task definition (both inconcrete/api
andconcrete/api-thumbnails
) so that the task definition doesn't overwrite the image's run command.This issue should only be closed once both the API codebase and the task definition template are updated.
The text was updated successfully, but these errors were encountered: