25 lines
427 B
Docker
25 lines
427 B
Docker
|
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
|