config docker pre mod
This commit is contained in:
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -49,3 +49,5 @@ coverage
|
|||||||
tmp
|
tmp
|
||||||
temp
|
temp
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
|
out
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user