Config self convex #48

Merged
killer-cf merged 3 commits from config-self-convex into master 2025-11-26 18:42:47 +00:00
3 changed files with 7 additions and 12 deletions
Showing only changes of commit e1bd6fa61a - Show all commits

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
node_modules

2
.gitignore vendored
View File

@@ -49,3 +49,5 @@ coverage
tmp tmp
temp temp
.eslintcache .eslintcache
out

View File

@@ -8,18 +8,10 @@ WORKDIR /usr/src/app
RUN addgroup --system --gid 1001 sveltekit RUN addgroup --system --gid 1001 sveltekit
RUN adduser --system --uid 1001 sveltekit RUN adduser --system --uid 1001 sveltekit
# Copy package.json and bun.lock (if available) # Copy package.json and bun.lock (if available)
COPY package.json bun.lock* ./ 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) # Install dependencies (including dev dependencies for build)
# This will resolve workspace dependencies using the package.json files we just copied # This will resolve workspace dependencies using the package.json files we just copied
RUN bun install --frozen-lockfile RUN bun install --frozen-lockfile
@@ -44,13 +36,13 @@ RUN addgroup --system --gid 1001 sveltekit
RUN adduser --system --uid 1001 sveltekit RUN adduser --system --uid 1001 sveltekit
# Copy built application from base stage # 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/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/package.json ./package.json
# Copy node_modules from root (Bun manages workspaces centrally) # Copy node_modules from root (Bun manages workspaces centrally)
COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/node_modules ./node_modules COPY --from=base --chown=sveltekit:sveltekit /usr/src/app/node_modules ./node_modules
# Copy any additional files needed for runtime # 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 # Switch to non-root user
USER sveltekit USER sveltekit