2023-12-09 11:01:41 +00:00
|
|
|
FROM git.nanobyte.cz/nanobyte-public/nano-rust:1.74.5f84654 AS builder
|
2023-12-03 18:22:18 +00:00
|
|
|
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
|
|
|
|
|
2023-12-09 11:01:41 +00:00
|
|
|
FROM git.nanobyte.cz/nanobyte-public/nano-rust:1.74.5f84654
|
2023-12-03 18:22:18 +00:00
|
|
|
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/
|
2023-12-08 23:30:34 +00:00
|
|
|
COPY resources/* /rund/resources/
|
2023-12-03 18:22:18 +00:00
|
|
|
WORKDIR /rund
|
|
|
|
EXPOSE 8000
|
|
|
|
ENV ROCKET_ADDRESS=0.0.0.0
|
|
|
|
ENV PACKAGE_NAME=${PACKAGE_NAME}
|
|
|
|
ENTRYPOINT $PACKAGE_NAME
|