ovlach_pdf/Dockerfile
2023-12-09 16:22:22 +01:00

23 lines
633 B
Docker

FROM git.nanobyte.cz/nanobyte-public/nano-rust:1.74.5f84654 AS builder
ARG PACKAGE_NAME="ovlach_pdf"
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_pdf"
ARG GITEA_TOKEN
RUN apt-get update && apt-get install -y chromium
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