Skip to content

UniExeterRSE/team-day-jul-2023-lightsail-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/

About

Tempate for CI/CD workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published