diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 4000655..da64349 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -77,3 +77,5 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + build-args: | + APP_VERSION=${{ github.event.release.tag_name }} diff --git a/Dockerfile b/Dockerfile index 7857059..c7e7b78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ FROM python:3.11 -# Set the working directory +ARG APP_VERSION +ENV APP_VERSION=$APP_VERSION +# Set the working directory WORKDIR /app # Copy the current directory contents into the container at /app - COPY app /app # Copy entrypoint.sh COPY entrypoint.sh /app # Install any needed packages specified in requirements.txt - RUN pip install --no-cache-dir -r /app/requirements.txt EXPOSE 5000 diff --git a/app/app.py b/app/app.py index 2dec4c4..4b76ed3 100644 --- a/app/app.py +++ b/app/app.py @@ -1,3 +1,5 @@ +import os + import dash from dash import Dash, html import dash_bootstrap_components as dbc @@ -26,6 +28,21 @@ className="mb-3", ), dash.page_container, + html.Footer( + [ + html.A( + "Source", + href="https://github.com/robswc/nadocast-ui", + className="text-white", + ), + html.A( + f"Release: " f"{os.getenv('APP_VERSION', None)}", + href=f"https://github.com/robswc/nadocast-ui/releases/tag/{os.getenv('APP_VERSION', None)}", + className="text-white", + ), + ], + className="bg-black text-white d-flex align-items-center justify-content-between p-3", + ), ] )