build(docker): create Dockerfile

This commit is contained in:
Anhgelus Morhtuuzh 2024-11-10 01:36:21 +01:00
parent 3c7a957b84
commit 99d5a59e64
No known key found for this signature in database
GPG key ID: CAD341EFA92DDDE5

22
Dockerfile Normal file
View file

@ -0,0 +1,22 @@
FROM node:22 as builder
WORKDIR /app
COPY . .
RUN npm install -g bun
RUN bun install && bun run build
FROM golang:1.23-alpine
WORKDIR /app
COPY --from=builder . .
RUN go mod tidy && go mod build -o app .
ENV NOW_DOMAIN=""
ENV NOW_DATA=""
CMD ./app -domain $NOW_DOMAIN -data $NOW_DATA