Deploy command

This commit is contained in:
2024-10-02 23:12:52 +08:00
parent ae12eb2a15
commit dd36e2ab1a
12 changed files with 154 additions and 35 deletions

View File

@ -1,19 +1,15 @@
# Building Backend
FROM golang:alpine as roadsign-server
RUN apk add nodejs npm
WORKDIR /source
COPY . .
WORKDIR /source/pkg/sideload/view
RUN npm install
RUN npm run build
WORKDIR /source
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs -o /dist ./pkg/cmd/server/main.go
# Runtime
FROM golang:alpine
RUN apk add zip
COPY --from=roadsign-server /dist /roadsign/server
EXPOSE 81