Kaynağa Gözat

chore: update Dockerfiles to change user ownership from 'node' to 'bun'

- Modified the user ownership in both production and development Dockerfiles from 'node:node' to 'bun:bun' for all copied files.
- Ensured consistency in user permissions across the Docker setup.

These changes align the Docker configuration with the updated user management strategy.
ding113 1 ay önce
ebeveyn
işleme
781b7d556d
2 değiştirilmiş dosya ile 14 ekleme ve 14 silme
  1. 7 7
      deploy/Dockerfile
  2. 7 7
      deploy/Dockerfile.dev

+ 7 - 7
deploy/Dockerfile

@@ -38,15 +38,15 @@ RUN apt-get update && \
     apt-get install -y curl ca-certificates postgresql-client && \
     rm -rf /var/lib/apt/lists/*
 
-COPY --from=build --chown=node:node /app/public ./public
-COPY --from=build --chown=node:node /app/drizzle ./drizzle
-COPY --from=build --chown=node:node /app/messages ./messages
-COPY --from=build --chown=node:node /app/.next/standalone ./
+COPY --from=build --chown=bun:bun /app/public ./public
+COPY --from=build --chown=bun:bun /app/drizzle ./drizzle
+COPY --from=build --chown=bun:bun /app/messages ./messages
+COPY --from=build --chown=bun:bun /app/.next/standalone ./
 # Server Actions live inside .next/server; copy it or Next.js cannot resolve action IDs.
-COPY --from=build --chown=node:node /app/.next/server ./.next/server
-COPY --from=build --chown=node:node /app/.next/static ./.next/static
+COPY --from=build --chown=bun:bun /app/.next/server ./.next/server
+COPY --from=build --chown=bun:bun /app/.next/static ./.next/static
 
-USER node
+USER bun
 EXPOSE 3000
 
 CMD ["bun", "run", "server.js"]

+ 7 - 7
deploy/Dockerfile.dev

@@ -40,15 +40,15 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
     apt-get update && \
     apt-get install -y curl ca-certificates postgresql-client
 
-COPY --from=build --chown=node:node /app/public ./public
-COPY --from=build --chown=node:node /app/drizzle ./drizzle
-COPY --from=build --chown=node:node /app/messages ./messages
-COPY --from=build --chown=node:node /app/.next/standalone ./
+COPY --from=build --chown=bun:bun /app/public ./public
+COPY --from=build --chown=bun:bun /app/drizzle ./drizzle
+COPY --from=build --chown=bun:bun /app/messages ./messages
+COPY --from=build --chown=bun:bun /app/.next/standalone ./
 # Server Actions live inside .next/server; copy it or Next.js cannot resolve action IDs.
-COPY --from=build --chown=node:node /app/.next/server ./.next/server
-COPY --from=build --chown=node:node /app/.next/static ./.next/static
+COPY --from=build --chown=bun:bun /app/.next/server ./.next/server
+COPY --from=build --chown=bun:bun /app/.next/static ./.next/static
 
-USER node
+USER bun
 EXPOSE 3000
 
 CMD ["bun", "run", "server.js"]