This commit is contained in:
2026-04-11 12:12:07 +02:00
parent 3bc6e2e080
commit 5b3c5ebb2f
92 changed files with 10948 additions and 35 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM golang:1.22-alpine AS builder
RUN apk add --no-cache gcc musl-dev
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux go build -o rental-manager ./cmd/server
FROM node:20-alpine AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ .
RUN npm run build
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=builder /app/rental-manager .
COPY --from=frontend-builder /app/frontend/build ./frontend/build
RUN mkdir -p /app/data/documents
EXPOSE 8080
ENV TZ=Europe/Paris
CMD ["./rental-manager"]