fix: Docker
This commit is contained in:
parent
9409b71a54
commit
b04739e927
3 changed files with 41 additions and 33 deletions
|
@ -1,12 +1,37 @@
|
||||||
.git
|
# build folder
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# logs
|
||||||
|
logs/
|
||||||
|
.cache
|
||||||
|
.DS_Store
|
||||||
|
npm-debug.log
|
||||||
|
yarn-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
# process data
|
||||||
|
.pid
|
||||||
|
pids
|
||||||
|
.pid-lock
|
||||||
|
|
||||||
|
# Coverage & Test
|
||||||
|
coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Dependency folder
|
||||||
node_modules
|
node_modules
|
||||||
.eslint*
|
bower_components
|
||||||
.prettier*
|
jspm_packages
|
||||||
.git*
|
|
||||||
|
# Environment files
|
||||||
|
.dot
|
||||||
|
|
||||||
|
# Editor and other files
|
||||||
|
.idea
|
||||||
|
typing
|
||||||
|
internal
|
||||||
.vscode
|
.vscode
|
||||||
README.md
|
*.tgz
|
||||||
Dockerfile*
|
.eslintcache
|
||||||
docker-compose.yml
|
|
||||||
public
|
|
||||||
.svelte-kit
|
.svelte-kit
|
||||||
build
|
|
16
Dockerfile
16
Dockerfile
|
@ -6,29 +6,27 @@ ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json pnpm-lock.yaml ./
|
|
||||||
|
|
||||||
# Dependencies Stage for Production
|
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||||
|
|
||||||
# Build Stage
|
|
||||||
FROM base AS build
|
FROM base AS build
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
|
|
||||||
# Deploy Stage
|
|
||||||
FROM base AS deploy
|
FROM base AS deploy
|
||||||
|
|
||||||
COPY --from=deps /app/node_modules /app/node_modules
|
WORKDIR /app
|
||||||
COPY --from=build /app/build /app/build
|
|
||||||
|
COPY --from=build /app/build ./build
|
||||||
|
COPY --from=build /app/node_modules ./node_modules
|
||||||
|
COPY --from=build /app/package.json ./package.json
|
||||||
|
|
||||||
# Run as non-root user
|
# Run as non-root user
|
||||||
USER node
|
USER node
|
||||||
|
|
15
pnpm-lock.yaml
generated
15
pnpm-lock.yaml
generated
|
@ -3272,21 +3272,6 @@ packages:
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@sveltejs/kit': 1.x || 2.x
|
'@sveltejs/kit': 1.x || 2.x
|
||||||
svelte: 3.x || 4.x || >=5.0.0-next.51
|
svelte: 3.x || 4.x || >=5.0.0-next.51
|
||||||
peerDependenciesMeta:
|
|
||||||
'@sinclair/typebox':
|
|
||||||
optional: true
|
|
||||||
arktype:
|
|
||||||
optional: true
|
|
||||||
joi:
|
|
||||||
optional: true
|
|
||||||
superstruct:
|
|
||||||
optional: true
|
|
||||||
valibot:
|
|
||||||
optional: true
|
|
||||||
yup:
|
|
||||||
optional: true
|
|
||||||
zod:
|
|
||||||
optional: true
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sveltejs/kit': 2.5.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.10)(vite@5.1.1)
|
'@sveltejs/kit': 2.5.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.10)(vite@5.1.1)
|
||||||
devalue: 4.3.2
|
devalue: 4.3.2
|
||||||
|
|
Loading…
Add table
Reference in a new issue