Revert "back to nix"

This reverts commit 43af5f1a76.
This commit is contained in:
Ruidy 2024-07-18 14:44:20 +02:00
parent 441806bb4f
commit 036d267abf
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
2 changed files with 27 additions and 0 deletions

View file

@ -33,3 +33,7 @@ jobs:
- name: Run tests
run: |
go test ./...
- name: Build Docker image
run: |
docker build -t rentease .

23
Dockerfile Normal file
View file

@ -0,0 +1,23 @@
FROM golang:1.22-alpine AS builder
RUN apk add --no-cache \
git \
build-base
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /app/dist/rentease main.go
FROM scratch
COPY --from=builder /app/dist/rentease /app/dist/rentease
WORKDIR /app
EXPOSE 8000
ENTRYPOINT ["/app/dist/rentease"]