From e7323546718a5efd068b1a1f5598b7fffed720d2 Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Tue, 17 Dec 2024 09:04:49 +0530 Subject: [PATCH] Fix: run was referencing files in a subdirectory. Fix: Playbook was not importing the default vars. Improvement: Dockerfile casheing should improve. --- Dockerfile | 4 ++-- ansible/playbook.yml | 2 +- barker/run.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab576e4..eee6816 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,8 +28,6 @@ RUN \ FROM python:3.12 AS runner LABEL maintainer="Amritanshu " -COPY barker/pyproject.toml /app/pyproject.toml - RUN apt-get update && \ apt-get install -y locales && \ sed --in-place --expression='s/# en_IN UTF-8/en_IN UTF-8/' /etc/locale.gen && \ @@ -46,6 +44,8 @@ RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python WORKDIR /app +COPY barker/pyproject.toml /app/pyproject.toml + # Allow installing dev dependencies to run tests ARG INSTALL_DEV=false RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi" diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 45f573f..2e4fe97 100755 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -5,7 +5,7 @@ - hosts: barker become: true vars_files: - - default + - vars/default.yml - "{{ var_file }}" roles: diff --git a/barker/run.sh b/barker/run.sh index 78adf9a..0ef27c8 100755 --- a/barker/run.sh +++ b/barker/run.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash set -euo pipefail -gunicorn barker.main:app --worker-class uvicorn.workers.UvicornWorker --config ./barker/gunicorn.conf.py --log-config ./barker/logging.conf +gunicorn barker.main:app --worker-class uvicorn.workers.UvicornWorker --config ./gunicorn.conf.py --log-config ./logging.conf