FROM securityunion/yew:1.72-slim as build # TODO - this is a hack to get around the fact that the yew-ui crate is not bundled with the backend ENV ENABLE_OAUTH=false ENV LOGIN_URL="" ENV ACTIX_UI_BACKEND_URL="wss://api.rustlemania.com" ENV WEBTRANSPORT_HOST="https://transport.rustlemania.com" ENV WEBTRANSPORT_ENABLED="false" ENV E2EE_ENABLED="false" ENV USERS_ALLOWED_TO_STREAM="" WORKDIR /app COPY . . WORKDIR /app/yew-ui RUN rustup target add wasm32-unknown-unknown RUN trunk build --release FROM nginx:1.21.5-alpine as production COPY nginx.conf /etc/nginx/nginx.conf COPY --from=build /app/yew-ui/dist /usr/share/nginx/html