ovlach_frontend/Dockerfile

21 lines
547 B
Docker
Raw Normal View History

2023-12-03 18:22:18 +00:00
FROM git.nanobyte.cz/nanobyte/nano-rust:1.74.4e44cba AS builder
ARG PACKAGE_NAME="ovlach_frontend"
ARG GITEA_TOKEN
2023-11-26 15:36:39 +00:00
2023-12-03 18:22:18 +00:00
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/
WORKDIR /rund
EXPOSE 8000
ENV ROCKET_ADDRESS=0.0.0.0
ENV PACKAGE_NAME=${PACKAGE_NAME}
ENTRYPOINT $PACKAGE_NAME