Fix: run was referencing files in a subdirectory.

Fix: Playbook was not importing the default vars.
Improvement: Dockerfile casheing should improve.
This commit is contained in:
Amritanshu Agrawal 2024-12-17 09:04:49 +05:30
parent 6d3057bb55
commit e732354671
3 changed files with 4 additions and 4 deletions

View File

@ -28,8 +28,6 @@ RUN \
FROM python:3.12 AS runner
LABEL maintainer="Amritanshu <docker@tanshu.com>"
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"

View File

@ -5,7 +5,7 @@
- hosts: barker
become: true
vars_files:
- default
- vars/default.yml
- "{{ var_file }}"
roles:

View File

@ -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