diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 45fdee9..3470024 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -16,6 +16,14 @@ on: - '**.py' - '.github/workflows/validation.yml' +env: + POETRY_NO_INTERACTION: 1 + POETRY_VIRTUALENVS_IN_PROJECT: 1 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-latest @@ -58,9 +66,8 @@ jobs: poetry install --no-interaction - name: Ruff format - if: success() || failure() run: | - poetry run ruff format --check . --output-format github + poetry run ruff format --check . - name: Ruff lint if: success() || failure() diff --git a/Dockerfile b/Dockerfile index 78badfa..a5562bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,9 @@ RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR FROM python:3.12-slim-bookworm as runtime +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install tesseract-ocr + WORKDIR /app COPY --from=build-stage /app . diff --git a/docker-compose-local.yml b/docker-compose-local.yml new file mode 100644 index 0000000..bffa101 --- /dev/null +++ b/docker-compose-local.yml @@ -0,0 +1,20 @@ +# For local development, only database is running +# +# docker compose up -d +# fastapi dev +# +services: + redis: + container_name: lunchmenu-redis + image: redis:alpine + restart: unless-stopped + ports: + - "6379:6379" + command: "redis-server --save 20 1 --loglevel warning" + volumes: + - "redis_data:/data" + extra_hosts: + - host.docker.internal:host-gateway + +volumes: + redis_data: