Merge pull request 'fix: fix docker build for CI' (#50) from ci-fix into main
Reviewed-on: https://git.home.ms/jarianc/lofi-app/pulls/50
This commit is contained in:
commit
ae822ea505
@ -100,15 +100,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
built=false
|
built=false
|
||||||
if [[ -f docker/Dockerfile.backend ]]; then
|
if [[ -f docker/Dockerfile.backend ]]; then
|
||||||
docker build -t $GITHUB_REPOSITORY-backend:test -f docker/Dockerfile.backend .
|
docker build -t $(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')-backend:test -f docker/Dockerfile.backend .
|
||||||
built=true
|
built=true
|
||||||
fi
|
fi
|
||||||
if [[ -f frontend/Dockerfile ]]; then
|
if [[ -f frontend/Dockerfile ]]; then
|
||||||
docker build -t $GITHUB_REPOSITORY-frontend:test -f frontend/Dockerfile .
|
docker build -t $(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')-frontend:test -f frontend/Dockerfile .
|
||||||
built=true
|
built=true
|
||||||
fi
|
fi
|
||||||
if [[ -f android/Dockerfile ]]; then
|
if [[ -f android/Dockerfile ]]; then
|
||||||
docker build -t $GITHUB_REPOSITORY-android:test -f android/Dockerfile android/ || \
|
docker build -t $(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')-android:test -f android/Dockerfile android/ || \
|
||||||
echo "WARNING: Android build failed (williamkyo/android-sdk unavailable, non-blocking)"
|
echo "WARNING: Android build failed (williamkyo/android-sdk unavailable, non-blocking)"
|
||||||
built=true
|
built=true
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,14 +1,8 @@
|
|||||||
FROM python:3.12-slim AS builder
|
FROM python:3.12-slim AS builder
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends curl unzip \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY pyproject.toml uv.lock ./
|
COPY pyproject.toml ./
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
RUN pip install --no-cache-dir -e .
|
||||||
RUN curl -LsSf https://astral.sh/uv/0.5.25/install.sh | sh \
|
|
||||||
&& . "$HOME/.local/bin/env" \
|
|
||||||
&& uv sync --frozen
|
|
||||||
|
|
||||||
SHELL ["/bin/sh", "-c"]
|
SHELL ["/bin/sh", "-c"]
|
||||||
|
|
||||||
@ -44,8 +38,7 @@ WORKDIR /app
|
|||||||
COPY src/ ./src/
|
COPY src/ ./src/
|
||||||
|
|
||||||
ENV PLAYWRIGHT_BROWSERS_PATH=/app/.cache/ms-playwright
|
ENV PLAYWRIGHT_BROWSERS_PATH=/app/.cache/ms-playwright
|
||||||
RUN --mount=from=builder,source=/build/.venv/bin,target=/build/.venv/bin \
|
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
||||||
/build/.venv/bin/python -m playwright install chromium 2>/dev/null || true
|
|
||||||
RUN chown -R appuser:appuser /app
|
RUN chown -R appuser:appuser /app
|
||||||
|
|
||||||
RUN chown -R appuser:appuser /build
|
RUN chown -R appuser:appuser /build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user