Skip to content

Production-ready (i.e., dockerized) dash app boilerplate

License

Notifications You must be signed in to change notification settings

MaaniBeigy/dash-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boilerplate for Python Dash Projects

Build status coverage report static analysis vulnerabilities lint report Dependencies Status FOSSA Status

interrogate maintainability complexity Code style: black Security: bandit Pre-commit license

Production-ready (i.e., dockerized) dash app boilerplate.

Development

Uses gunicorn + nginx.

  1. Rename .env.dev.example to .env.dev.

  2. Update the environment variables in the docker-compose.yml and .env.dev files.

  3. Build the images and run the containers:

    docker-compose up -d --build

    Test it out at http://localhost:1337. The "web" folder is mounted into the container and your code changes apply automatically.

  4. Check the logs if necessary:

    docker-compose -f docker-compose.yml logs -f
  5. Drop the container when you are done:

    docker-compose -f docker-compose.yml down -v

Production

Uses gunicorn + nginx.

  1. Rename .env.prod.example to .env.prod. Update the environment variables.

  2. Build the images and run the containers:

    docker-compose -f docker-compose.prod.yml up -d --build

    Test it out at http://localhost:1337. No mounted folders. To apply changes, the image must be re-built.

  3. Check the logs if necessary:

    docker-compose -f docker-compose.prod.yml logs -f
  4. Drop the container when you are done:

    docker-compose -f docker-compose.prod.yml down -v

Local testing and generating badges:

python3.9 -m venv .venv_39
. .venv_39/bin/activate
python3 -m pip install --upgrade pip poetry
make install
make pre-commit-install
make test && make coverage && make check-codestyle && make mypy && make check-safety && make extrabadges

Upload code to GitHub:

pre-commit run --all-files
git add .
git commit -m ":tada: Initial commit"
git push -u origin main

Credits

testdrivenio/flask-on-docker

License

FOSSA Status

About

Production-ready (i.e., dockerized) dash app boilerplate

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •