23 lines
749 B
Docker
23 lines
749 B
Docker
FROM golang:1.23.1@sha256:b46e8734b39f93a584eae135fc545edfdee99f1fb55c077fca908a15eb07010c 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:7b2c1050e3bccd9866230b4e63a88f05683035a998da5cae655bac27168e50b7 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"]
|
|
|