fix: deployment pipeline for docker not working (#860)
* fix: skip env validation in dockerfile not working * fix: skip env validation in dockerfile not working * fix: remove linux/arm/v7 for now as node commands are run forever * fix: remove cache because it is to big? * refactor: remove redis log transport during build * fix: add more checks for conditional redis connection * fix: docker build not working locally * refactor: move base image to debian * chore: add arm v7 platform support * fix: remove armv7 support as not supported by turbo * chore: profile amd64 build * chore: enable webpack logging * chore: disable linux/arm64 for now * chore: remove profiling from build in dockerfile * chore: revert to node alpine image
This commit is contained in:
@@ -3,6 +3,7 @@ FROM node:20.16.0-alpine AS base
|
||||
FROM base AS builder
|
||||
RUN apk add --no-cache libc6-compat
|
||||
RUN apk update
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
@@ -35,6 +36,7 @@ RUN corepack enable pnpm && pnpm install
|
||||
|
||||
COPY --from=builder /app/next-out/json/ .
|
||||
COPY --from=builder /app/next-out/pnpm-lock.yaml ./pnpm-lock.yaml
|
||||
RUN corepack enable pnpm && pnpm install
|
||||
|
||||
RUN corepack enable pnpm && pnpm install sharp -w
|
||||
|
||||
@@ -46,8 +48,9 @@ COPY --from=builder /app/migration-out/full/ .
|
||||
|
||||
# Copy static data as it is not part of the build
|
||||
COPY static-data ./static-data
|
||||
ARG SKIP_ENV_VALIDATION=true
|
||||
RUN corepack enable pnpm && pnpm turbo run build
|
||||
ARG SKIP_ENV_VALIDATION='true'
|
||||
ARG DISABLE_REDIS_LOGS='true'
|
||||
RUN corepack enable pnpm && pnpm build
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
@@ -84,6 +87,6 @@ COPY --chown=nextjs:nodejs packages/redis/redis.conf /app/redis.conf
|
||||
ENV DB_URL='/appdata/db/db.sqlite'
|
||||
ENV DB_DIALECT='sqlite'
|
||||
ENV DB_DRIVER='better-sqlite3'
|
||||
ENV AUTH_PROVIDERS=credentials
|
||||
ENV AUTH_PROVIDERS='credentials'
|
||||
|
||||
CMD ["sh", "run.sh"]
|
||||
|
||||
Reference in New Issue
Block a user