Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhatthaiquang-agilityio/docker-compose-django
Deployment Django with Docker Compose
https://github.com/nhatthaiquang-agilityio/docker-compose-django
django django-development docker docker-compose nginx
Last synced: 19 days ago
JSON representation
Deployment Django with Docker Compose
- Host: GitHub
- URL: https://github.com/nhatthaiquang-agilityio/docker-compose-django
- Owner: nhatthaiquang-agilityio
- Created: 2016-09-06T14:36:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-24T08:14:04.000Z (over 8 years ago)
- Last Synced: 2024-04-16T07:09:37.604Z (9 months ago)
- Topics: django, django-development, docker, docker-compose, nginx
- Language: JavaScript
- Homepage:
- Size: 176 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django Development With Docker Compose and Machine
##Feature:
- Docker
- Docker Compose
- Docker Machine
- Python 2.7
- Django 1.8.4
- Postgres
- Nginx
- Redis
- Gunicorn## Run command:
+ Start new machine:
```
$docker-machine create -d virtualbox dev;
$docker-machine start dev
```+ Build images:
```
$docker-compose build
```+ Start services:
```
$docker-compose up -d
```+ Create database:
```
$docker exec -it dockercomposedjango_postgres_1 bash
$psql djangodocker --user postgres
```+ Create migrations:
```
$docker-compose run web /usr/local/bin/python /srv/web/manage.py migrate
```+ Run Django App:
```
$docker-compose run web python /srv/web/manage.py runserver 0.0.0.0:8000
```+ Grab IP and view in your browser:
```
$docker-machine ip dev`
```## Reference:
+ [Django Development with Docker Compose and Machine](https://realpython.com/blog/python/django-development-with-docker-compose-and-machine/)