This repository has been archived on 2025-08-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
web-app-template/Dockerfile
Tim e0f7bd95ac
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 46s
#109 update deployment
2024-08-24 20:50:20 +02:00

23 lines
535 B
Docker

FROM golang:1.23.0 AS BUILDER_GO
WORKDIR /me-fit
RUN go install github.com/a-h/templ/cmd/templ@latest
COPY . ./
RUN templ generate && go build -o /me-fit/me-fit .
FROM node:22.7.0 AS BUILDER_NODE
WORKDIR /me-fit
COPY . ./
RUN npm install && npm run build
FROM debian:12.6
WORKDIR /me-fit
RUN apt-get update && apt-get install -y ca-certificates && echo "" > .env
COPY --from=BUILDER_GO /me-fit/me-fit ./me-fit
COPY --from=BUILDER_NODE /me-fit/static ./static
COPY migrations ./migrations
EXPOSE 8080
ENTRYPOINT ["/me-fit/me-fit"]