- docker
- Pip
- docker-compose
wget -qO- https://get.docker.com/ | sh
sudo pip install docker-compose
django-admin.py startproject --template=https://github.com/abalx/django-project-template-docker/zipball/master --extension py,yml project_name
cp configs/env.template docker/.env
vim docker/.env
docker-compose -f docker/docker-compose.yml up
That's it. By default the project is available at 0.0.0.0:8000
This project has separate frontend layer. It's in directory client
.
There're directories:
-
apps
- static and templates of applications -
assets
- there're two files -main.js
andmain.scss
. They should import other static files (import manually) -
build
- compiled static by gulp and webpack -
node_modules
- npm applications -
vendor
- bower applications
media_root
and static_root
will be also here.
Create a new client application:
docker exec -it <PROJECT_NAME>_server python server/manage.py startclientapp <APPLICATION_NAME>
Will be created a new client app:
client/
apps/
APPLICATION_NAME/
static/
APPLICATION_NAME/
images/
js/
APPLICATION_NAME.js
styles/
APPLICATION_NAME.scss
templates/
APPLICATION_NAME/