Skip to content

ROpdam/docker-dash-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • Note: hotfix for werkzeug issue #1992 in place
  • Note: changed deployment from Heroku to Google Cloud Run

Docker Dash Example

A simple design for a plotly-dash app with sklearn running within a docker container deployed to Google Cloud Run using CI/CD. Continuous Integration and Delivery

For a deep dive on the implementation please see:

  1. Initial deployment through Heroku.
  2. Current deployment to GCP through Google Cloud Run

Inspired by This TDD Course

Repo structure

├── .github
│   └── workflows
│        └── main.yml
│
├── project
│   ├── app
│   │   ├── __init__.py
│   │   ├── app.py
│   │   ├── functions.py
│   │   └── assets
│   ├── tests
│   │   └── test_functions.py
│   ├── Dockerfile
│   ├── Dockerfile.prod
│   └── requirements.txt
│
├── release.sh
├── setup.cfg
├── .pre-commit-config.yaml
├── .gitignore
│
└── README.md

Run locally

To run the image locally, cd into the docker-dash-example folder and:

docker build -t docker-dash project/.

And run the container

docker run -p 8050:8050 docker-dash

You can find to the app on your local machine http://localhost:8050/ (or localhost:8050). This way the image is created using the Dockerfile, instead of the Dockerfile.prod.

Project context

This was a fun project to apply different learnings in practice, very happy to hear your thoughts in the repo, including feedback of course!

About

Example of containerized deployment of Dash app to Google Cloud Run, https://docker-dash-example.com/

Topics

Resources

Stars

Watchers

Forks

Packages