Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 795 Bytes

README.md

File metadata and controls

42 lines (36 loc) · 795 Bytes

Dockerizing Django with Postgres, Gunicorn, and Nginx

Instruction for Docker Deployment

Installation

Requirements:

  • Docker Latest

Follow these steps:

  • Make a file name .env
  • In.env file change SQL_HOST="db" or DB_HOST="db"
  • Make a file name .env.docker add for postgres
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