Add Dockerfile and Docker-compose.yml

This commit is contained in:
Sonali Rangampally
2026-05-26 16:17:49 -07:00
parent ea5c3484d9
commit 9f93a759f0
3 changed files with 53 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
FROM oven/bun:1-alpine AS frontend-builder
WORKDIR /app/front
COPY front/package.json front/bun.lock ./
RUN bun install --frozen-lockfile
COPY front/ ./
RUN bun run build
FROM golang:1.25-alpine AS backend-builder
WORKDIR /app/back
COPY back/go.mod back/go.sum ./
RUN go mod download
COPY back/ ./
RUN go build -o iknowyou ./cmd/server
FROM alpine:latest
WORKDIR /app
RUN apk add --no-cache ca-certificates
COPY --from=backend-builder /app/back/iknowyou .
COPY --from=frontend-builder /app/front/dist ./static
EXPOSE 8080
ENV IKY_PORT=8080
ENV IKY_FRONT_DIR=/app/static
CMD ["./iknowyou"]