mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 14:55:45 +00:00
build(docker): fix dockerfile
This commit is contained in:
@@ -2,9 +2,17 @@
|
||||
|
||||
# ============================================
|
||||
# Client Builder - On-demand client rebuilds
|
||||
# Uses pre-built deps from lifeforge-deps image
|
||||
# ============================================
|
||||
FROM lifeforge-deps:latest
|
||||
FROM oven/bun:alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Install all dependencies
|
||||
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
||||
bun install --frozen-lockfile --ignore-scripts --linker isolated
|
||||
|
||||
# Set environment
|
||||
ENV DOCKER_MODE=true
|
||||
|
||||
@@ -7,13 +7,21 @@ FROM ghcr.io/muchobien/pocketbase:latest AS pocketbase
|
||||
|
||||
# ============================================
|
||||
# DB Init Container - Generates and applies migrations
|
||||
# Uses pre-built deps from lifeforge-deps image
|
||||
# ============================================
|
||||
FROM lifeforge-deps:latest
|
||||
FROM oven/bun:alpine
|
||||
|
||||
# Copy PocketBase binary from official image
|
||||
COPY --from=pocketbase /usr/local/bin/pocketbase /usr/local/bin/pocketbase
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Install all dependencies
|
||||
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
||||
bun install --frozen-lockfile --linker isolated
|
||||
|
||||
# Set environment for Docker mode
|
||||
ENV DOCKER_MODE=true
|
||||
ENV PB_DIR=/pb_data
|
||||
|
||||
Reference in New Issue
Block a user