From e1bd6fa61a7eb476f73f78d953851f6dea93d319 Mon Sep 17 00:00:00 2001 From: killer-cf Date: Wed, 26 Nov 2025 11:08:36 -0300 Subject: [PATCH] config docker pre mod --- .dockerignore | 1 + .gitignore | 2 ++ Dockerfile => apps/web/Dockerfile | 16 ++++------------ 3 files changed, 7 insertions(+), 12 deletions(-) create mode 100644 .dockerignore rename Dockerfile => apps/web/Dockerfile (66%) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/.gitignore b/.gitignore index fe40c64..f930d47 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ coverage tmp temp .eslintcache + +out \ No newline at end of file diff --git a/Dockerfile b/apps/web/Dockerfile similarity index 66% rename from Dockerfile rename to apps/web/Dockerfile index addd94c..e9875f3 100644 --- a/Dockerfile +++ b/apps/web/Dockerfile @@ -8,18 +8,10 @@ WORKDIR /usr/src/app RUN addgroup --system --gid 1001 sveltekit RUN adduser --system --uid 1001 sveltekit + # Copy package.json and bun.lock (if available) COPY package.json bun.lock* ./ -# Copy workspace packages first (needed for bun install to resolve local dependencies) -# Copy package.json files to establish workspace structure -COPY packages/backend/package.json ./packages/backend/ -COPY packages/eslint-config/package.json ./packages/eslint-config/ -# Copy eslint-config files (needed for the package to be valid) -COPY packages/eslint-config/*.js ./packages/eslint-config/ -# Copy apps/web package.json (also part of the workspace) -COPY apps/web/package.json ./apps/web/ - # Install dependencies (including dev dependencies for build) # This will resolve workspace dependencies using the package.json files we just copied RUN bun install --frozen-lockfile @@ -44,13 +36,13 @@ RUN addgroup --system --gid 1001 sveltekit RUN adduser --system --uid 1001 sveltekit # Copy built application from base stage -COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/apps/web/build ./build -COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/apps/web/package.json ./package.json +COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/build ./build +COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/package.json ./package.json # Copy node_modules from root (Bun manages workspaces centrally) COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/node_modules ./node_modules # Copy any additional files needed for runtime -COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/apps/web/static ./static +COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/static ./static # Switch to non-root user USER sveltekit