23 lines
749 B
Docker
23 lines
749 B
Docker
FROM golang:1.23.0@sha256:1a6db32ea47a4910759d5bcbabeb8a8b42658e311bd8348ea4763735447c636c 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.8.0@sha256:8ec02324cb37718197de92e51677781be9f1345c709f31a1f44440c6036d24a2 AS builder_node
|
|
WORKDIR /me-fit
|
|
COPY . ./
|
|
RUN npm install && npm run build
|
|
|
|
|
|
FROM debian:12.7@sha256:b8084b1a576c5504a031936e1132574f4ce1d6cc7130bbcc25a28f074539ae6b
|
|
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"]
|
|
|