diff --git a/Dockerfile b/Dockerfile index bd53494..fddba72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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": [\ @@ -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 diff --git a/app/main.py b/app/main.py index 40bdd33..a317337 100644 --- a/app/main.py +++ b/app/main.py @@ -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, )