-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from bento-platform/asyncify
Asyncify with Quart + add Docker container CI building
- Loading branch information
Showing
26 changed files
with
2,177 additions
and
326 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.coverage | ||
.github | ||
.mypy_cache | ||
.tox | ||
env |
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,32 @@ | ||
name: Build and push bento_service_registry | ||
on: | ||
release: | ||
types: [ published ] | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-push: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Bento build action | ||
uses: bento-platform/[email protected] | ||
with: | ||
registry: ghcr.io | ||
registry-username: ${{ github.actor }} | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} | ||
image-name: ghcr.io/bento-platform/bento_service_registry | ||
development-dockerfile: dev.Dockerfile | ||
dockerfile: Dockerfile |
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
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 |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
__pycache__ | ||
env/ | ||
.coverage | ||
.mypy_cache | ||
.tox | ||
htmlcov/ | ||
.idea/workspace.xml | ||
.idea/dataSources* | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,29 @@ | ||
FROM ghcr.io/bento-platform/bento_base_image:python-debian-latest | ||
|
||
# Use uvicorn (instead of hypercorn) in production since I've found | ||
# multiple benchmarks showing it to be faster - David L | ||
RUN pip install --no-cache-dir poetry==1.2.2 "uvicorn[standard]==0.20.0" | ||
|
||
# Backwards-compatible with old BentoV2 container layout | ||
WORKDIR /service-registry | ||
|
||
COPY pyproject.toml pyproject.toml | ||
COPY poetry.toml poetry.toml | ||
COPY poetry.lock poetry.lock | ||
|
||
# Install production dependencies | ||
# Without --no-root, we get errors related to the code not being copied in yet. | ||
# But we don't want the code here, otherwise Docker cache doesn't work well. | ||
RUN poetry install --without dev --no-root | ||
|
||
# Manually copy only what's relevant | ||
# (Don't use .dockerignore, which allows us to have development containers too) | ||
COPY bento_service_registry bento_service_registry | ||
COPY entrypoint.sh entrypoint.sh | ||
COPY LICENSE LICENSE | ||
COPY README.md README.md | ||
|
||
# Install the module itself, locally (similar to `pip install -e .`) | ||
RUN poetry install --without dev | ||
|
||
CMD [ "sh", "./entrypoint.sh" ] |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,6 @@ | ||
import configparser | ||
import os | ||
from importlib import metadata | ||
|
||
__all__ = ["name", "__version__"] | ||
|
||
config = configparser.ConfigParser() | ||
config.read(os.path.join(os.path.dirname(os.path.realpath(__file__)), "package.cfg")) | ||
|
||
name = config["package"]["name"] | ||
__version__ = config["package"]["version"] | ||
name = __package__ | ||
__version__ = metadata.version(__package__) |
Oops, something went wrong.