Commit 0c40a370 authored by nanamicat's avatar nanamicat

Dockerfile

parent 583de7b7
Pipeline #41997 passed with stages
in 4 minutes and 18 seconds
FROM node:16-alpine AS web FROM rust:alpine AS chef
WORKDIR /app RUN cargo install cargo-chef
COPY web/package*.json ./ WORKDIR app
RUN npm ci
COPY web .
RUN npm run build
FROM node:16-alpine FROM chef AS planner
WORKDIR /app COPY . .
COPY server/package*.json ./ RUN cargo chef prepare --recipe-path recipe.json
RUN npm ci
COPY server .
COPY --from=web /app/dist/railgun-dashboard public
CMD [ "./node_modules/.bin/ts-node", "src/main.ts"] FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN cargo build --release
FROM alpine
WORKDIR app
COPY --from=builder /app/target/release/railgun-routing-server /usr/local/bin
ENTRYPOINT ["/usr/local/bin/railgun-routing-server"]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment