mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-12 21:08:46 +00:00
Dockerfile 추가
This commit is contained in:
31
.dockerignore
Normal file
31
.dockerignore
Normal file
@@ -0,0 +1,31 @@
|
||||
.git
|
||||
node_modules
|
||||
|
||||
# Output
|
||||
.output
|
||||
.vercel
|
||||
.netlify
|
||||
.wrangler
|
||||
/.svelte-kit
|
||||
/build
|
||||
/drizzle
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# VSCode
|
||||
/.vscode
|
||||
|
||||
# Env
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
!.env.test
|
||||
|
||||
# Vite
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
# SQLite
|
||||
*.db
|
||||
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
# Build Stage
|
||||
FROM node:18-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install -g pnpm@8
|
||||
|
||||
COPY pnpm-lock.yaml .
|
||||
RUN pnpm fetch
|
||||
|
||||
COPY . .
|
||||
RUN pnpm install --offline
|
||||
RUN pnpm build
|
||||
|
||||
# Deploy Stage
|
||||
FROM node:18-alpine
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install -g pnpm@8
|
||||
|
||||
COPY pnpm-lock.yaml .
|
||||
RUN pnpm fetch --prod
|
||||
|
||||
COPY package.json .
|
||||
RUN pnpm install --offline --prod
|
||||
|
||||
COPY --from=build /app/build ./build
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "./build/index.js"]
|
||||
@@ -1,6 +1,9 @@
|
||||
import { building } from "$app/environment";
|
||||
import { env } from "$env/dynamic/private";
|
||||
|
||||
if (!env.JWT_SECRET) throw new Error("JWT_SECRET is not set");
|
||||
if (!building) {
|
||||
if (!env.JWT_SECRET) throw new Error("JWT_SECRET is not set");
|
||||
}
|
||||
|
||||
export default {
|
||||
databaseUrl: env.DATABASE_URL || "local.db",
|
||||
|
||||
Reference in New Issue
Block a user