Skip to content

Commit

Permalink
Added Version Log Text
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWicklowWolf authored Aug 7, 2024
1 parent c973dc4 commit 372be01
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
FROM python:3.12-alpine

# Set build arguments
ARG RELEASE_VERSION
ENV RELEASE_VERSION=${RELEASE_VERSION}

# Create User
ARG UID=1000
ARG GID=1000
RUN addgroup -g $GID general_user && \
adduser -D -u $UID -G general_user -s /bin/sh general_user

# Create directories and set permissions
COPY . /radarec
WORKDIR /radarec
RUN chown -R $UID:$GID /radarec

# Install requirements and run code as general_user
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 5000
Expand Down
7 changes: 7 additions & 0 deletions src/RadaRec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ class DataHandler:
def __init__(self):
logging.basicConfig(level=logging.INFO, format="%(message)s")
self.radarec_logger = logging.getLogger()

app_name_text = os.path.basename(__file__).replace(".py", "")
release_version = os.environ.get("RELEASE_VERSION", "unknown")
self.radarec_logger.warning(f"{'*' * 50}\n")
self.radarec_logger.warning(f"{app_name_text} Version: {release_version}\n")
self.radarec_logger.warning(f"{'*' * 50}")

self.search_in_progress_flag = False
self.new_found_movies_counter = 0
self.clients_connected_counter = 0
Expand Down
1 change: 1 addition & 0 deletions src/static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function append_movies(movies) {
movie_col.querySelector('.add-to-radarr-btn').addEventListener('click', function () {
var add_button = this;
add_button.disabled = true;
add_button.textContent = "Adding...";
add_to_radarr(movie.Name, movie.Year);
});
movie_col.querySelector('.get-overview-btn').addEventListener('click', function () {
Expand Down

0 comments on commit 372be01

Please sign in to comment.