Skip to content

Dockerizing Django with Postgres, Gunicorn, and Nginx

Notifications You must be signed in to change notification settings

akmamun/django-nginx-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dockerizing Django with Postgres, Gunicorn, and Nginx

Instruction for Docker Deployment

Installation

Requirements:

  • Default requirements mentioned above.
  • Docker Latest

Follow these steps:

  • Make a file name .env.docker add add
POSTGRES_USER=postgres
POSTGRES_PASSWORD=giveapassword
POSTGRES_DB=postgres

Up and Run

  • Docker Build
docker-compose up -d --build
docker-compose exec server python manage.py migrate --noinput
  • Collect Statics
docker-compose exec server python manage.py collectstatic --no-input --clear
  • Check Logs
docker-compose logs -f
  • Container down
docker-compose down

Releases

No releases published

Packages

No packages published