Back to results
hadiMh/Django_Docker_with_PostgreSql(opens in a new tab)
Language: Python
- stars
- 239
- watchers
- 1
- forks
- 109
- open issues
- 3
- Last updated
- 01/16/2024
Language: Python
This is a boilerplate to start a django project with postgresql as database running on docker.
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.
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.
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