-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jidea-59 Dockerise web app #19
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
=======================================
Coverage 54.02% 54.02%
=======================================
Files 22 22
Lines 509 509
Branches 35 35
=======================================
Hits 275 275
Misses 226 226
Partials 8 8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you recall what caused the differences in package-lock.json?
Yeah, I took out the lint on commit stuff when I was restricted to my Windows laptop which didn't get on with it. Accidentally committed, and re-installed, so package lock got refreshed! |
…-vars Remove the use of Github Actions variables
…ute/daedalus-web-app into jidea-59-dockerise-web-app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!!!
This branch adds a Dockerfile and related scripts for the web app. It also pushes both the web app and database containers to the github registry during CI - the SHA tag is always pushed, the branch tag is only pushed on CI success.
You should be able to follow the instructions in the README on running locally in docker. You should see that scenario enumeration and API versions are successfully retrieved, showing that the db and API are accessible to the app container.
You should also still be able to run the app outside docker when dependencies are running!
Key changes:
docker/Dockerfile
- the web app dockerfile, which copies over all source, installs and builds the app. The startup command applies database migrations (so db container must be running before web app container), then runs the app.docker/build
,docker/run
anddocker/push
scripts to build, run and push the app container (SHA tag).db/scripts/build
tag to use the SHA tag (for consistency, and assuming for local development you want to work with the latest SHA), and also added apush
script for the dbpush-branch-tag
script to push the branch tags of both containersrun-dependencies
runs the containers in a network, so they can talk to each other. Added anenv.docker
file for the urls of the API and database within the network, which is injected into the web app container indocker/run
.common
file intodocker
as it seemed to make more sense there.