-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (35 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
45 lines (35 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# =============================================================================
# Vowel Core - Production Runtime
# =============================================================================
# This Dockerfile expects pre-built assets in the dist/ directory:
# - dist/client/ - Client library assets
# - dist/ui/ - Core UI build output
# - dist/src/ - Server source code
# - dist/package.json - Server package configuration
#
# Build locally first with: ./scripts/build.sh
# =============================================================================
FROM oven/bun:1.2-alpine
# Install curl for healthchecks
RUN apk add --no-cache curl
WORKDIR /app
# Copy package files and install production dependencies
COPY dist/package.json dist/bun.lock* ./
RUN bun install --frozen-lockfile --production --no-cache
# Copy server source
COPY dist/src/ ./src/
# Copy built UI assets
COPY dist/ui/ ./ui/dist/
# Create data directory
RUN mkdir -p /app/data
# Environment
ENV NODE_ENV=production
ENV PORT=3000
ENV DB_PATH=/app/data/core.db
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=10s --timeout=5s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
# Start server
CMD ["bun", "run", "src/server/index.ts"]