Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ FROM python:3.11-slim
COPY app /app
RUN python -m pip install /app --extra-index-url https://www.piwheels.org/simple

WORKDIR /app

EXPOSE 8000/tcp

LABEL version="0.0.3"
LABEL version="0.0.4"

ARG IMAGE_NAME

Expand All @@ -15,7 +17,7 @@ LABEL permissions='\
"8000/tcp": {}\
},\
"HostConfig": {\
"Binds":["/usr/blueos/extensions/$IMAGE_NAME:/app"],\
"Binds":["/usr/blueos/extensions/quickstart/logs:/app/logs"],\
"ExtraHosts": ["host.docker.internal:host-gateway"],\
"PortBindings": {\
"8000/tcp": [\
Expand Down Expand Up @@ -52,4 +54,4 @@ LABEL links='{\
}'
LABEL requirements="core >= 1.1"

ENTRYPOINT litestar run --host 0.0.0.0
ENTRYPOINT litestar --app main:app run --host 0.0.0.0
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def increment_persistent_count(self, state: State) -> dict[str, int]:
route_handlers=[CountController],
state=State({'bag_url':'http://host.docker.internal/bag/v1.0'}),
static_files_config=[
StaticFilesConfig(directories=['app/static'], path='/', html_mode=True)
StaticFilesConfig(directories=[Path(__file__).parent / 'static'], path='/', html_mode=True)
],
logging_config=logging_config,
)
Expand Down