Skip to content

Commit

Permalink
Merge pull request #489 from bento-platform/chore/daphne-dev-server
Browse files Browse the repository at this point in the history
chore: set up Daphne ASGI dev server + update base img, lockfile deps
  • Loading branch information
davidlougheed committed Mar 14, 2024
2 parents f48d450 + 37d49f5 commit 5c603a1
Show file tree
Hide file tree
Showing 5 changed files with 551 additions and 223 deletions.
4 changes: 2 additions & 2 deletions bento.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.02.14
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.03.01

SHELL ["/bin/bash", "-c"]

Expand All @@ -7,7 +7,7 @@ SHELL ["/bin/bash", "-c"]
RUN apt-get update -y && \
apt-get install -y postgresql-client && \
rm -rf /var/lib/apt/lists/* && \
pip install --no-cache-dir "uvicorn[standard]==0.27.1"
pip install --no-cache-dir "uvicorn[standard]==0.28.0"

# Backwards-compatible with old BentoV2 container layout
WORKDIR /app
Expand Down
5 changes: 2 additions & 3 deletions bento.dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.02.14
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.03.01

LABEL org.opencontainers.image.description="Local development image for Katsu."
LABEL devcontainer.metadata='[{ \
Expand All @@ -17,8 +17,7 @@ SHELL ["/bin/bash", "-c"]
# Install Poetry for dependency management
RUN apt-get update -y && \
apt-get install -y postgresql-client && \
rm -rf /var/lib/apt/lists/* && \
pip install --no-cache-dir "uvicorn[standard]==0.27.1"
rm -rf /var/lib/apt/lists/*

# Backwards-compatible with old BentoV2 container layout
WORKDIR /app
Expand Down
3 changes: 2 additions & 1 deletion chord_metadata_service/metadata/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@

# Application definition

INSTALLED_APPS = [
INSTALLED_APPS = (['daphne'] if os.environ.get('BENTO_CONTAINER_LOCAL') else []) + [
'dal',
'dal_select2',

Expand Down Expand Up @@ -187,6 +187,7 @@
},
]

ASGI_APPLICATION = 'chord_metadata_service.metadata.asgi.application'
WSGI_APPLICATION = 'chord_metadata_service.metadata.wsgi.application'

LOGGING = {
Expand Down

0 comments on commit 5c603a1

Please sign in to comment.