Skip to content

Commit

Permalink
fix: Attempted fix for cache ID issue
Browse files Browse the repository at this point in the history
  • Loading branch information
RamiAwar committed Jan 23, 2025
1 parent de6bb44 commit 55fe6dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ COPY frontend/ .
# Temporary setup - need local env as the 'production' build is landing page only
ARG API_URL="/"

# Used for railway builds
ARG SERVICE_ID="1"

ENV VITE_API_URL=$API_URL
ENV NODE_ENV=local
RUN npm run build
Expand All @@ -50,8 +53,10 @@ RUN mkdir -p /home/dataline/backend
# Temporarily use uv command from remote image to install dependencies
# https://docs.astral.sh/uv/guides/integration/docker/#non-editable-installs
# Mount the lock and pyproject.toml to speed up image build time if these files are not changed
# Cache ID follows railway structure
# https://docs.railway.com/guides/dockerfiles#cache-mounts
RUN --mount=from=ghcr.io/astral-sh/uv,source=/uv,target=/bin/uv \
--mount=type=cache,id=uv-cache,target=/root/.cache/uv \
--mount=type=cache,id=id=s/${SERVICE_ID}-root/.cache/uv,target=/root/.cache/uv \
--mount=type=bind,source=backend/uv.lock,target=uv.lock \
--mount=type=bind,source=backend/pyproject.toml,target=pyproject.toml \
uv sync --no-dev --frozen --no-install-project
Expand Down

0 comments on commit 55fe6dd

Please sign in to comment.