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

Run OCL API using gunicorn #897

Closed
rkorytkowski opened this issue Aug 10, 2021 · 3 comments
Closed

Run OCL API using gunicorn #897

rkorytkowski opened this issue Aug 10, 2021 · 3 comments
Assignees
Milestone

Comments

@rkorytkowski
Copy link
Contributor

OCL API should use gunicorn and nginx for production deployments.

See https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/

@rkorytkowski
Copy link
Contributor Author

We need to prioritize this as it affects performance.

@rkorytkowski
Copy link
Contributor Author

According to docs dev server negates reusing DB connections, see https://docs.djangoproject.com/en/3.2/ref/databases/#caveats

@paynejd paynejd added this to the Sprint 17 milestone Aug 16, 2021
rkorytkowski added a commit to rkorytkowski/oclapi2 that referenced this issue Aug 27, 2021
rkorytkowski added a commit to rkorytkowski/oclapi2 that referenced this issue Aug 27, 2021
rkorytkowski added a commit to rkorytkowski/oclapi2 that referenced this issue Aug 30, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 30, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 30, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 31, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 31, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 31, 2021
@rkorytkowski
Copy link
Contributor Author

Done! As part of the change I based the image on alpine (reduced size from ~450 MBs to ~120 MBs) and made it a two step build (no build time dependencies in runtime image). Also running not as root, but a regular user for safety. It does not use nginx at this point. We may decide to add nginx in front when we actually need caching/static content serving.

rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 31, 2021
@rkorytkowski rkorytkowski changed the title Run OCL API using gunicorn and nginx Run OCL API using gunicorn Aug 31, 2021
rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 31, 2021
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

2 participants