Skip to content

This is a sample code for dockerizing your django application with Postgres, Nginx and Gunicorn and setting up with github actions.

Notifications You must be signed in to change notification settings

aamishbaloch/django_with_github_actions

Repository files navigation

Dockerizing Django App

This is a sample code for dockerizing your django application with Postgres. We'll add on Nginx and Gunicorn as well.

Dependencies

  • Django v3.2.6
  • Docker v20.10.8
  • Python v3.9.6

Usage

Following are the required steps to use this platform.

  • Clone the repo
  • Update the .env file
  • Build the image
$ docker-compose build
  • Once the image is built, run the container
$ docker-compose up

Bonus

If you want to ssh the container you can use the makefile

$ make ssh

then you can use all the django commands.

To generate static files for Django Admin, use:

$ docker-compose exec app python manage.py collectstatic --no-input --clear

About

This is a sample code for dockerizing your django application with Postgres, Nginx and Gunicorn and setting up with github actions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published