mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
Jsut testing in prod :(
This commit is contained in:
parent
2e9845c268
commit
a0b3438781
@ -1,12 +1,31 @@
|
|||||||
|
# Dependencies
|
||||||
node_modules
|
node_modules
|
||||||
.nuxt
|
.pnpm-store
|
||||||
|
|
||||||
|
# Build outputs
|
||||||
.output
|
.output
|
||||||
.next
|
.next
|
||||||
dist
|
dist
|
||||||
|
build
|
||||||
|
|
||||||
|
# Version control
|
||||||
.git
|
.git
|
||||||
.env
|
.gitignore
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
.env*
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# System files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
npm-debug.log
|
Thumbs.db
|
||||||
yarn-debug.log
|
|
||||||
yarn-error.log
|
# IDE
|
||||||
.env.*
|
.idea
|
||||||
|
.vscode
|
19
Dockerfile
19
Dockerfile
@ -2,16 +2,14 @@ FROM oven/bun:latest as builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package.json first
|
# Copy package files
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
|
|
||||||
# Copy lock files if they exist (support both bun and npm/yarn)
|
|
||||||
COPY bun.lockb* package-lock.json* yarn.lock* ./
|
COPY bun.lockb* package-lock.json* yarn.lock* ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN bun install --frozen-lockfile || bun install
|
RUN bun install --frozen-lockfile || bun install
|
||||||
|
|
||||||
# Copy remaining source files
|
# Copy source files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
@ -22,12 +20,15 @@ FROM oven/bun:latest
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy built assets and dependencies
|
# Copy package files for production
|
||||||
COPY --from=builder /app/.output /app/.output
|
|
||||||
COPY --from=builder /app/dist /app/dist
|
|
||||||
COPY --from=builder /app/build /app/build
|
|
||||||
COPY --from=builder /app/package.json ./
|
COPY --from=builder /app/package.json ./
|
||||||
COPY --from=builder /app/bun.lockb* ./
|
COPY --from=builder /app/bun.lockb* ./
|
||||||
|
|
||||||
|
# Conditionally copy build outputs based on framework
|
||||||
|
COPY --from=builder /app/.output* /app/.output* 2>/dev/null || true
|
||||||
|
COPY --from=builder /app/dist* /app/dist* 2>/dev/null || true
|
||||||
|
COPY --from=builder /app/build* /app/build* 2>/dev/null || true
|
||||||
|
COPY --from=builder /app/.next* /app/.next* 2>/dev/null || true
|
||||||
# If you have customized your output directory, please add your custom one here, or just remove it. :)
|
# If you have customized your output directory, please add your custom one here, or just remove it. :)
|
||||||
|
|
||||||
|
|
||||||
@ -35,4 +36,6 @@ COPY --from=builder /app/bun.lockb* ./
|
|||||||
RUN bun install --production
|
RUN bun install --production
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
# Start command will be determined by the framework
|
||||||
CMD ["bun", "run", "start"]
|
CMD ["bun", "run", "start"]
|
Loading…
x
Reference in New Issue
Block a user