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
renovate 300aca64f4
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 47s
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 51s
chore(deps): update node.js to 69e667a
2024-09-28 22:15:32 +00:00

23 lines
766 B
Docker

FROM golang:1.23.1@sha256:4f063a24d429510e512cc730c3330292ff49f3ade3ae79bda8f84a24fa25ecb0 AS builder_go
WORKDIR /me-fit
RUN go install github.com/a-h/templ/cmd/templ@latest
COPY . ./
RUN templ generate && go test ./... && go build -o /me-fit/me-fit .
FROM node:22.9.0@sha256:69e667a79aa41ec0db50bc452a60e705ca16f35285eaf037ebe627a65a5cdf52 AS builder_node
WORKDIR /me-fit
COPY . ./
RUN npm install && npm run build
FROM debian:12.7@sha256:27586f4609433f2f49a9157405b473c62c3cb28a581c413393975b4e8496d0ab
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 migration ./migration
EXPOSE 8080
ENTRYPOINT ["/me-fit/me-fit"]