Docker Files

This commit is contained in:
2026-04-11 23:29:50 +00:00
parent e7b55f873b
commit 858e504372
3 changed files with 42 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
FROM oven/bun:latest AS builder
WORKDIR /app
# Install dependencies
COPY website/package.json website/bun.lock ./
RUN bun install --frozen-lockfile
# Build the SvelteKit application
COPY website/ .
RUN bun run build
# Setup the production environment
FROM oven/bun:latest
WORKDIR /app
# Copy production dependencies configuration and install
COPY --from=builder /app/package.json /app/bun.lock ./
RUN bun install --production --frozen-lockfile
# Copy the build output and the custom Bun server
COPY --from=builder /app/build ./build
COPY --from=builder /app/server ./server
EXPOSE 3000
CMD ["bun", "run", "server/app.ts"]
+13
View File
@@ -0,0 +1,13 @@
version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
env_file:
- .env
environment:
- NODE_ENV=production
+1
View File
@@ -0,0 +1 @@
PORT=3000