Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akmamun/django-nginx-docker
Dockerizing Django with Postgres, Gunicorn, and Nginx
https://github.com/akmamun/django-nginx-docker
devlopment devops django docker docker-compose docker-deployment gunicorn nginx postgresql python
Last synced: 28 days ago
JSON representation
Dockerizing Django with Postgres, Gunicorn, and Nginx
- Host: GitHub
- URL: https://github.com/akmamun/django-nginx-docker
- Owner: akmamun
- Created: 2020-11-09T09:55:34.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-12T04:41:16.000Z (over 3 years ago)
- Last Synced: 2024-10-17T02:00:54.367Z (3 months ago)
- Topics: devlopment, devops, django, docker, docker-compose, docker-deployment, gunicorn, nginx, postgresql, python
- Language: Dockerfile
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerizing Django with Postgres, Gunicorn, and Nginx
## Instruction for Docker Deployment## Installation
Requirements:
- Docker LatestFollow 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
```sh
POSTGRES_USER=postgres
POSTGRES_PASSWORD=giveapassword
POSTGRES_DB=postgres
```## Up and Run
- Docker Build
```sh
docker-compose up -d --build
```
- Lets Browse [http://0.0.0.0:8080](http://0.0.0.0:8080)
- Migration
```sh
docker-compose exec server python manage.py migrate --noinput
```
- Collect Statics
```sh
docker-compose exec server python manage.py collectstatic --no-input --clear
```
- Check Logs
```sh
docker-compose logs -f
```
- Container down
```sh
docker-compose down
```