mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 13:23:14 +01:00
They see my errors... they hatin'
This commit is contained in:
@@ -1,13 +1,21 @@
|
|||||||
# Node dependencies
|
# Node dependencies
|
||||||
FROM public.ecr.aws/docker/library/node:18-alpine AS frontend-dependencies
|
FROM public.ecr.aws/docker/library/node:18-alpine AS frontend-dependencies
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install bash and pnpm dependencies
|
||||||
|
RUN apk update && apk add --no-cache bash
|
||||||
|
|
||||||
|
# Install pnpm globally
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
|
|
||||||
COPY frontend/package.json frontend/pnpm-lock.yaml ./
|
COPY frontend/package.json frontend/pnpm-lock.yaml ./
|
||||||
RUN pnpm install --frozen-lockfile --shamefully-hoist
|
RUN pnpm install --frozen-lockfile --shamefully-hoist
|
||||||
|
|
||||||
# Build Nuxt
|
# Build Nuxt
|
||||||
FROM public.ecr.aws/docker/library/node:18-alpine AS frontend-builder
|
FROM public.ecr.aws/docker/library/node:18-alpine AS frontend-builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy frontend and install node_modules from previous stage
|
||||||
COPY frontend ./
|
COPY frontend ./
|
||||||
COPY --from=frontend-dependencies /app/node_modules ./node_modules
|
COPY --from=frontend-dependencies /app/node_modules ./node_modules
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
@@ -51,7 +59,7 @@ ENV HBOX_STORAGE_DATA=/data/
|
|||||||
ENV HBOX_STORAGE_SQLITE_URL=/data/homebox.db?_fk=1&_time_format=sqlite
|
ENV HBOX_STORAGE_SQLITE_URL=/data/homebox.db?_fk=1&_time_format=sqlite
|
||||||
|
|
||||||
# Install necessary runtime dependencies
|
# Install necessary runtime dependencies
|
||||||
RUN apk --no-cache add ca-certificates wget curl
|
RUN apk --no-cache add ca-certificates wget curl bash
|
||||||
|
|
||||||
# Copy the binary and data directory
|
# Copy the binary and data directory
|
||||||
COPY --from=builder /go/bin/api /app
|
COPY --from=builder /go/bin/api /app
|
||||||
|
|||||||
Reference in New Issue
Block a user