refactor: simplify parse ingredients code

This commit is contained in:
2025-01-19 19:22:19 +01:00
parent f106460502
commit 78e94ccf82
14 changed files with 201 additions and 137 deletions

View File

@ -1,21 +1,25 @@
FROM denoland/deno:2.1.4 AS build
RUN apt-get update && apt-get install -y --no-install-recommends \
curl && \
deno run -A npm:playwright install --with-deps firefox &&\
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY deno.json /app/
COPY . .
ENV DATA_DIR=/app/data
RUN apt-get update && apt install -y curl && \
deno run -A npm:playwright install --with-deps firefox && \
deno install --allow-import --allow-ffi --allow-scripts=npm:sharp@0.33.5-rc.1 -e main.ts && \
RUN mkdir -p $DATA_DIR && \
deno install --allow-import --allow-ffi --allow-scripts=npm:sharp@0.33.5-rc.1 -e main.ts &&\
sed -i -e 's/"deno"/"no-deno"/' node_modules/@libsql/client/package.json &&\
mkdir -p $DATA_DIR &&\
deno task build
EXPOSE 8000
# Start the application
CMD ["run", "-A", "main.ts"]