initial commit
All checks were successful
Build and publish the docker image / build (push) Successful in 58s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-04-05 09:58:58 +03:00
commit 4df8b90dae
26 changed files with 1530 additions and 0 deletions

36
Dockerfile Normal file
View File

@ -0,0 +1,36 @@
FROM golang:1.24.0 AS builder
RUN apt update
RUN apt install -y sassc
WORKDIR /src
COPY *.mod ./
COPY *.sum ./
RUN go mod download
COPY *.go ./
COPY Makefile ./
COPY static ./static
COPY extract ./extract
COPY routes ./routes
COPY util ./util
COPY views ./views
RUN make CGO_ENABLED=0
FROM alpine AS runner
RUN adduser -h /app -D -u 1001 runner
COPY --from=builder /src/tren.elf /app/tren.elf
COPY --from=builder /src/views /app/views
COPY --from=builder /src/static /app/static
RUN rm /app/static/css/*.scss
RUN chown -R runner:runner /app
USER runner
WORKDIR /app
ENTRYPOINT ["/app/tren.elf"]