Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.26 KB

README.md

File metadata and controls

49 lines (30 loc) · 1.26 KB

lightsail-dash-demo

Demo of AWS Docker container deployment (Lightsail)

The example dash app

https://dash.plotly.com/minimal-app

To install, and run, using pipenv

% pipenv run python app/main.py

To install manually, see https://dash.plotly.com/installation

Building the Docker container

% docker build -t dash-example:latest .

Running

% docker run -p 8080:80 dash-example

Deploy to AWS Lightsail

You probably shouldn't do this manually, but if you did the command would look something like this -

% % aws lightsail push-container-image --region eu-west-2 --service-name container-service-1 --image dash-example:latest --label dash-example 

Workflows

https://docs.github.com/en/actions/using-workflows/about-workflows

Test the docker image build

For a deployable application there must be a Dockerfile that can be built, so it makes sense to test for this with every push to the repository.

Push the latest docker image to Lightsail

The Lighsail action builds the docker image and pushes it to a container service. This action requires OIDC authentication and a suitable IAM role.

For more information on Lightsail see https://aws.amazon.com/lightsail/features/