This repository has been archived by the owner on May 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile for easier deployment of registry (#50)
* Add Dockerfile for easier deployment of registry * Add README note * Add docker build in CI * Fix old typo in README * Hit endpoints in same workflow step * Add healthcheck to docker container
- Loading branch information
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from python:3.11-slim-buster | ||
|
||
env PORT=8000 | ||
workdir /app | ||
|
||
# Copy local version of the registry and install reqs | ||
copy requirements.txt /app | ||
run pip install -r requirements.txt | ||
|
||
copy schemas /app/schemas | ||
copy marda_registry /app/marda_registry | ||
copy tasks.py /app | ||
|
||
# Regenerate models from the current schemas | ||
run invoke regenerate-models | ||
|
||
# Validate all entries against the schema | ||
run invoke validate-entries | ||
|
||
cmd uvicorn marda_registry.app:app --host 0.0.0.0 --port ${PORT} | ||
|
||
healthcheck --interval=5m --timeout=3s --start-period=10s \ | ||
cmd curl --fail http://localhost:${PORT} || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters