FROM git.nanobyte.cz/nanobyte/nano-rust:1.74.4e44cba AS builder ARG PACKAGE_NAME="ovlach_frontend" ARG GITEA_TOKEN COPY . /data/ RUN cd /data && cargo-nan "${GITEA_TOKEN}" cargo build --release FROM git.nanobyte.cz/nanobyte/nano-rust:1.74.4e44cba ARG PACKAGE_NAME="ovlach_frontend" ARG GITEA_TOKEN COPY --from=builder /data/target/release/${PACKAGE_NAME} /bin RUN mkdir /rund COPY Rocket.toml /rund COPY templates/* /rund/templates/ COPY resources/* /rund/resources/ WORKDIR /rund EXPOSE 8000 ENV ROCKET_ADDRESS=0.0.0.0 ENV PACKAGE_NAME=${PACKAGE_NAME} ENTRYPOINT $PACKAGE_NAME