diff --git a/Dockerfile b/Dockerfile index 499036c..21a711f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,16 @@ # Building Backend -FROM golang:alpine as roadsign-server +FROM rust: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.rs/main.go +RUN cargo build --release # Runtime -FROM golang:alpine +FROM alpine:latest -COPY --from=roadsign-server /dist /roadsign/server +COPY --from=roadsign-server /source/target/release/roadsign /roadsign/server EXPOSE 81