NPTfisheries / dfrm_website

0 stars 0 forks source link

4: Backend Services - Update and Hosting. ECS? EC2? #5

Open tylerstright opened 2 weeks ago

tylerstright commented 2 weeks ago

We need to host the services via Elastic Container Service (ECS) or Elastic Compute Cloud (EC2) - not positive which.

If it's within a docker container (I think that makes sense), we need to have a Dockerfile built specifically for Production - it will use Gunicorn. Gunicorn docs say they recommend using it behind an Nginx proxy https://docs.gunicorn.org/en/latest/deploy.html

TO DO:

  1. Update services to target S3 bucket for static files.
  2. Update services to communicate with Backend Database (This may be entirely in the .env files.)
  3. Code updates to function appropriately with these two - mainly thinking the S3 static files. The save process for images/documents may need attention (limit file sizes?) as well as the process to retrieve those images. This may require some frontend changes.
tylerstright commented 1 week ago

https://docs.djangoproject.com/en/5.0/howto/deployment/

It suggests we will need to also figure out 'error reporting' in the production env.