feat(db): add postgres, goose migrations and initial schema

This commit is contained in:
kk10
2026-10-03 11:40:26 +03:00
parent 2f279a1715
commit 4c1d08f8a8
3 changed files with 103 additions and 3 deletions
+8
View File
@@ -0,0 +1,8 @@
FROM golang:1.27.1-alpine3.24 AS build
ENV CGO_ENABLED=0
RUN go install github.com/pressly/goose/v3/cmd/goose@v3.28.0
FROM alpine:3.24
COPY --from=build /go/bin/goose /usr/local/bin/goose
COPY migrations /migrations
ENTRYPOINT ["sh", "-c", "goose -dir /migrations postgres \"$(cat /run/secrets/database_url)\" up"]