Skip to content

start a django project with postgresql as database running on docker.

Notifications You must be signed in to change notification settings

saeed90webdev/Django_Docker_with_PostgreSql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this project?

This is a boilerplate to start a django project with postgresql as database running on docker.

How to use?

If you want to get notified about the future changes Follow my github account.

First clone the project.

git clone https://github.com/hadiMh/Django_Docker_with_PostgreSql.git

Then make sure Docker is running.

  • If you are on windows click on the Docker Desktop icon and wait for about a minute.

Then in the project directory run this command:

docker-compose up --build

It will create two containers: One for Django and one for PostgreSql as the database for the project. All the required packages will be installed.

Install a new package.

  • Attention: If you want to install a package for django project you should run this command:
docker-compose exec web pip install <package-name>

Don't forget to add the new package to requirements.txt for further use:

docker-compose exec web pip freeze > requirements.txt

About

start a django project with postgresql as database running on docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.1%
  • Dockerfile 2.9%