mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 18:30:32 -06:00
update dockerfile to work with new folder structure
This commit is contained in:
@@ -6,13 +6,13 @@ WORKDIR /app
|
||||
# First install the dependencies (as they change less often)
|
||||
COPY . .
|
||||
# Copy .env file because Docker don't follow symlinks
|
||||
COPY .env /app/apps/hq/
|
||||
COPY .env /app/apps/web/
|
||||
|
||||
RUN pnpm install
|
||||
|
||||
# Build the project
|
||||
RUN pnpm dlx prisma generate
|
||||
RUN pnpm turbo run build --filter=hq...
|
||||
RUN pnpm turbo run build --filter=web...
|
||||
|
||||
FROM node:18-slim AS runner
|
||||
RUN npm install -g pnpm
|
||||
@@ -24,14 +24,14 @@ USER nextjs
|
||||
|
||||
WORKDIR /home/nextjs
|
||||
|
||||
COPY --from=installer /app/apps/hq/next.config.js .
|
||||
COPY --from=installer /app/apps/hq/package.json .
|
||||
COPY --from=installer /app/apps/web/next.config.js .
|
||||
COPY --from=installer /app/apps/web/package.json .
|
||||
|
||||
# Automatically leverage output traces to reduce image size
|
||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||
COPY --from=installer --chown=nextjs:nodejs /app/apps/hq/.next/standalone ./
|
||||
COPY --from=installer --chown=nextjs:nodejs /app/apps/hq/.next/static ./apps/hq/.next/static
|
||||
COPY --from=installer --chown=nextjs:nodejs /app/apps/hq/public ./apps/hq/public
|
||||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
|
||||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
|
||||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public
|
||||
COPY --from=installer --chown=nextjs:nodejs /app/packages/database/prisma ./packages/database/prisma
|
||||
|
||||
CMD pnpm dlx prisma migrate deploy && node apps/hq/server.js
|
||||
CMD pnpm dlx prisma migrate deploy && node apps/web/server.js
|
||||
@@ -10,7 +10,7 @@ services:
|
||||
formbricks-hq:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./apps/hq/Dockerfile
|
||||
dockerfile: ./apps/web/Dockerfile
|
||||
depends_on:
|
||||
- postgres
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user