diff --git a/Dockerfile.prod b/Dockerfile.prod index 78343f3..e21f0ae 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -12,9 +12,14 @@ RUN bun --bun run build # Launch FROM oven/bun:1 AS production +RUN groupadd --gid 1001 nuxt-app \ + && useradd --uid 1001 --gid nuxt-app \ + --shell /bin/bash --create-home nuxt-app + +USER nuxt-app:nuxt-app WORKDIR /app COPY --from=build /app/.output /app -EXPOSE 80/tcp +EXPOSE 3000/tcp ENTRYPOINT [ "bun", "--bun", "run", "/app/server/index.mjs" ] diff --git a/nuxt.config.ts b/nuxt.config.ts index 954634e..e632c86 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -5,6 +5,9 @@ export default defineNuxtConfig({ compatibilityDate: '2025-05-15', devtools: { enabled: true }, modules: ['@nuxt/eslint', '@nuxt/image', 'shadcn-nuxt', '@nuxtjs/color-mode', '@nuxt/icon'], + nitro: { + preset: 'bun', + }, colorMode: { classSuffix: '' },