For the Dockerized Covid Dash in R repository.
Fork the repository on GitHub.
Clone the fork locally.
git clone https://github.com/<username>/plotly_visualization_workshop
cd plotly_visualization_workshopSet your git email and name for commits.
git config --global user.email "<email>"
git config --global user.name "<name>"Build the Plotly Docker image.
docker build -t workshop .Use a container to test the default sample.R script.
docker run --rm -p 8050:8050 workshopUse containers to test the additional R scripts.
docker run --rm -p 8050:8050 workshop sample_withloop.R
docker run --rm -p 8050:8050 workshop sample_loop_plus_selector.RChange the default container script.
Open Dockerfile and change line 13 from:
CMD ["sample.R"]
to:
CMD ["sample_withloop.R"]
Rebuild the Plotly Docker image. Caching should make this faster.
docker build -t workshop .Test the new container default.
docker run --rm -p 8050:8050 workshopCommit and push the change to the GitHub fork.
git add .
git commit -m "New default script"Log in to Heroku through the command line using your Heroku account credentials.
heroku login -iCreate a new app in Heroku.
heroku create --stack container viz-workshop-<unique>Push the code to the Heroku app and deploy.
git push heroku mainVisit the running app in a browser window.
https://viz-workshop-.herokuapp.com/
Remove the local Docker image.
docker image rm workshopRemove the Heroku app.
heroku apps:destroy viz-workshop-<unique>