ovlach_frontend/Dockerfile

22 lines
593 B
Docker

FROM git.nanobyte.cz/nanobyte-public/nano-rust:1.74.5f84654 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-public/nano-rust:1.74.5f84654
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