Skip to content

Commit

Permalink
Compose local,tesseract,Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JersyJ authored and trnila committed Jun 30, 2024
1 parent 398aeea commit 8ca6f53
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
20 changes: 20 additions & 0 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit 8ca6f53

Please sign in to comment.