-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (24 loc) · 768 Bytes
/
Dockerfile
File metadata and controls
35 lines (24 loc) · 768 Bytes
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
# Build stage
FROM golang:1.24-bookworm AS builder
WORKDIR /app
# Download dependencies first (cached layer)
COPY go.mod go.sum ./
RUN go mod download
# Copy source and build
COPY . .
RUN CGO_ENABLED=1 GOOS=linux go build -ldflags="-s -w" -o parsely-web ./cmd/web
# Final stage
FROM debian:bookworm-slim
# Install CA certs (for HTTPS calls to Anthropic API) and sqlite3 runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libsqlite3-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/parsely-web .
# Create mount point for Railway persistent volume
RUN mkdir -p /data
# Railway injects PORT at runtime; default to 8080 for local runs
ENV PORT=8080
EXPOSE 8080
CMD ["./parsely-web"]