All checks were successful
Build and Push Docker Image / build (push) Successful in 12m31s
Reviewed-on: #3 Co-authored-by: Mirko Milovanovic <mir_ko@me.com> Co-committed-by: Mirko Milovanovic <mir_ko@me.com>
23 lines
650 B
Docker
23 lines
650 B
Docker
FROM debian:bookworm-slim
|
|
|
|
# Install Python and curl
|
|
RUN apt-get update && apt-get install -y python3 python3-pip python3-venv curl
|
|
|
|
# Create and activate a virtual environment
|
|
RUN python3 -m venv /app/venv
|
|
ENV PATH="/app/venv/bin:$PATH"
|
|
|
|
# Install dependencies with venv
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN /app/venv/bin/pip install -r /app/requirements.txt
|
|
|
|
# Copy the application
|
|
COPY main.py /app
|
|
COPY utils/ /app/utils
|
|
WORKDIR /app
|
|
|
|
# Run the application
|
|
CMD ["/app/venv/bin/python", "main.py"]
|
|
|
|
# Healthcheck
|
|
HEALTHCHECK --interval=5s --timeout=10s --retries=5 --start-period=5s CMD curl -f http://localhost:9092/heartbeat || exit 1 |