init commit

This commit is contained in:
2025-12-29 21:24:24 +00:00
commit dc44a89a67
5 changed files with 542 additions and 0 deletions

32
Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
FROM golang:alpine AS builder
# Install build tools needed for go-sqlite3 (CGO)
RUN apk add --no-cache gcc musl-dev
WORKDIR /app
# Initialize module and get dependencies
RUN go mod init calendar-service && \
go get github.com/mattn/go-sqlite3 && \
go get golang.org/x/crypto/bcrypt && \
go get golang.org/x/net/webdav && \
go get github.com/google/uuid
COPY main.go .
RUN go build -o server main.go
# Final Stage
FROM alpine:latest
WORKDIR /root/
COPY --from=builder /app/server .
# Create directory for sqlite db
RUN mkdir -p data
EXPOSE 8000
# Run the server
CMD ["./server"]