GithubHelp home page GithubHelp logo

krzysieqq / dunp Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 19 KB

Docker container template using docker-compose with Django, Nginx, uWSGI and Postgres

License: MIT License

Dockerfile 8.16% Shell 91.84%
django django-docker django-docker-boilerplate docker docker-compose docker-django uwsgi uwsgi-nginx uwsgi-nginx-docker postgresql

dunp's Introduction

DUNP

Docker container template using docker-compose with Django, Nginx, uWSGI and Postgres

Requirements

In order use this template bash, Docker and Docker-Compose are required (docker>19.03 CE and docker-compose>1.26).
Tested only on Ubuntu-based Linux distribution but should work on MacOS

Initialization new custom project

1. Clone repo

Repository can be cloned by one of following commands:

  • Via SSH: git clone [email protected]:krzysieqq/DUNP.git <your_project_name>
  • Via HTTPS: git clone https://github.com/krzysieqq/DUNP.git <your_project_name>
2. Docker containers

Upon cloning the repository to init your project you should run commands below:

  1. ./run.sh -i <your_project_name> to initialize local setup and config development environment with creating new django project. Remember that <your_project_name> should follow PEP-8 - Package and Module Names convention.
    • Optionally you could give your Django version to init project by running command ./run.sh -i <your_project_name> <django_version> f.g. ./run.sh -i foo_bar 4.0
  2. ./run.sh -u to start local containers with follow output or ./run.sh -u without output.
  3. Optional. If you'd like to create super user account run ./run.sh -csu <password> f.g. ./run.sh -csu admin. Default admin username is admin.
  4. You can delete original .git folder (rm -rf .git) and init your repository to start develop project.

Local web address: http://localhost:8000/
Django Admin Panel address: http://localhost:8000/admin
WDB address: http://localhost:1984

Instructions

Usage of ./run.sh file:
Usage (params with '*' are optional):
./run.sh                                             -> UP containers in detach mode
./run.sh bash|-sh                                    -> Open bash in main container
./run.sh build|-b <params*>                          -> BUILD containers
./run.sh build-force|-bf <params*>                   -> Force build containers (with params no-cache, pull)
./run.sh custom_command|-cc                          -> Custom docker-compose command
./run.sh create_django_secret|-crs                   -> Create Django Secret Key
./run.sh create_superuser|-csu <password>            -> Create default super user
./run.sh down|-dn                                    -> DOWN (stop and remove) containers
./run.sh downv|-dnv                                  -> DOWN (stop and remove with volumes) containers
./run.sh init|-i <project name> <django version*>    -> Initial setup and config development environment with creating new django project
./run.sh help|-h                                     -> Show this help message
./run.sh logs|-l <params*>                           -> LOGS from ALL containers
./run.sh logsf|-lf <params*>                         -> LOGS from ALL containers with follow option
./run.sh shell|-sl                                   -> Open shell in main container
./run.sh shell_plus|-sp                              -> Open shell plus (only if django_extensions installed) in main container
./run.sh makemigrate|-mm <params*>                   -> Make migrations and migrate inside main container
./run.sh notebook|-nb                                -> Run notebook (only if django_extensions installed)
./run.sh recreate|-rec <params*>                     -> Up and recreate containers
./run.sh recreated|-recd <params*>                   -> Up and recreate containers in detach mode
./run.sh restart|-r <params*>                        -> Restart containers
./run.sh rm|-rm <params*>                            -> Remove force container
./run.sh setup|-stp                                  -> Setup project for local development
./run.sh stop|-s <params*>                           -> Stop containers
./run.sh test|-t <params*>                           -> Run tests
./run.sh up|-u <params*>                             -> UP containers with output

You could also run ./run.sh help or ./run.sh -h in terminal to show this message.

dunp's People

Contributors

krzysieqq avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

dunp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.