All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m4s
- Fixes an issue where configuration from Consul was not being loaded correctly due to multiple base64 and encoding issues. - Adds robust decoding logic with fallbacks to handle different value formats from Consul. - Adds the Git commit SHA as a version identifier to the Docker image and application logs to improve debuggability.
28 lines
769 B
Docker
28 lines
769 B
Docker
# Use an official Python runtime as a parent image
|
|
FROM python:3.13-slim
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Accept the Git commit SHA as a build argument
|
|
ARG COMMIT_SHA
|
|
# Set the Git SHA as an environment variable
|
|
ENV GIT_SHA=${COMMIT_SHA}
|
|
|
|
# Copy the dependencies file to the working directory
|
|
COPY requirements.txt .
|
|
|
|
# Install any needed packages specified in requirements.txt
|
|
RUN pip install --upgrade pip; pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
|
# Copy the rest of the application's code to the working directory
|
|
COPY . .
|
|
|
|
# Set up a volume for persistent data
|
|
VOLUME /app/data
|
|
|
|
# The command to run the application
|
|
ENTRYPOINT ["python", "fitbitsync.py"]
|
|
|
|
# Default command to run when container starts
|
|
CMD ["schedule"] |