frontend/Dockerfile

25 lines
452 B
Docker
Raw Normal View History

2023-10-04 19:37:33 +00:00
FROM rust:latest as build
# Install trunk
RUN cargo install trunk
# Install wasm target
RUN rustup target add wasm32-unknown-unknown
RUN mkdir -p /frontend
WORKDIR /frontend
COPY Cargo.lock Cargo.toml index.html ./
COPY src ./src
COPY style ./style
2023-10-08 12:22:16 +00:00
# Build for preview release.
RUN NC_BETA_BUILD="" trunk build --release
2023-10-04 19:37:33 +00:00
FROM nginx:latest
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /frontend/dist /usr/share/nginx/html