diff --git a/Dockerfile b/Dockerfile index b6a8f85..530a7bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ ENV VIRTUAL_ENV=/app/.venv \ PATH="/app/.venv/bin:$PATH" WORKDIR /app - +RUN mkdir -p /app/logs COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} COPY --from=builder /app/src/ /app/src COPY --from=builder /app/main.py /app/main.py diff --git a/src/aws_lightsail_guard/__init__.py b/src/aws_lightsail_guard/__init__.py index 9c79066..5504855 100644 --- a/src/aws_lightsail_guard/__init__.py +++ b/src/aws_lightsail_guard/__init__.py @@ -2,6 +2,6 @@ from dotenv import load_dotenv -logging.basicConfig(filename='guard.log', filemode='a', level=logging.INFO, +logging.basicConfig(filename='logs/guard.log', filemode='a', level=logging.INFO, format='%(asctime)s - %(message)s') load_dotenv()