- build: somewhat polished dockerization setup - build: io/fs migrations with `golang-migrate` - feat: automatic init. admin account creation (.env creds) - feat(routers): combined user & token routers into single auth router - feat(routers): improved route layouts (`Routes`) - feat(middlewares): removed redundant `userCtx` middleware - fix(schema): note <-> note_versions relation (versioning) - feat(queries): removed redundant rollback functionality - feat(queries): combined duplicate version check & insertion/creation - tests: decreased redundancy by removing 'unnecessary' unit tests - refactor: hid internal packages behind `server/internal` - docs: notes & auth handler comments
20 lines
387 B
Docker
20 lines
387 B
Docker
# Build stage
|
|
FROM golang:1.24.2-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum .
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
# Optionally we could also strip debug symbols with `-ldflags '-s'`
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /notatest .
|
|
|
|
# Final stage (optimized image size)
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /notatest /app/notatest
|
|
EXPOSE 8080
|
|
|
|
CMD ["/app/notatest"]
|