feat: migrate to zine

This commit is contained in:
2024-12-26 20:02:07 -08:00
parent d4ae0bf2c8
commit cbfe9aea40
48 changed files with 796 additions and 505 deletions

View File

@@ -1,29 +1,12 @@
FROM golang:1.23-alpine as builder
FROM busybox:latest
# Set the working directory
WORKDIR /app
RUN adduser -D static
USER static
WORKDIR /home/static
# Copy and download dependencies
COPY go.mod go.sum ./
RUN go mod download
COPY ./zig-out/ .
# Copy the source code
COPY . .
EXPOSE 3000
# Build the Go application
RUN go build -o server .
CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"]
# Create a minimal runtime image
FROM alpine:latest
# Set the working directory
WORKDIR /root/
# Copy the compiled binary from the builder
COPY --from=builder /app/server .
# Expose the application port (e.g., 8080)
EXPOSE 8080
# Run the application
CMD ["./server"]