Skip to content

Commit

Permalink
Merge pull request #26 from robswc/9-add-footer
Browse files Browse the repository at this point in the history
feat: add footer and SemVer in footer
  • Loading branch information
robswc authored May 11, 2024
2 parents bfc5128 + d722e94 commit 27e63c1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 17 additions & 0 deletions app/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import dash
from dash import Dash, html
import dash_bootstrap_components as dbc
Expand Down Expand Up @@ -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",
),
]
)

Expand Down

0 comments on commit 27e63c1

Please sign in to comment.