frontend/Dockerfile

25 lines
427 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
# Build for release.
RUN trunk build --release
FROM nginx:latest
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /frontend/dist /usr/share/nginx/html