# Torrents.csv Dockerfile # Build front end resources FROM node:10 AS node-builder ARG UI_PATH=/usr/app/server/ui COPY server/ui ${UI_PATH} WORKDIR ${UI_PATH} ARG ENDPOINT_NAME=0.0.0.0:8080 RUN echo "export const endpoint = '${ENDPOINT_NAME}';" > src/env.ts RUN yarn RUN yarn build # Build back end FROM rust:1.30 # Copy the torrents.csv file COPY torrents.csv /usr/app/ # Creating a directory to work from ARG SERVICE_PATH=/usr/app/server/service COPY server/service ${SERVICE_PATH} WORKDIR ${SERVICE_PATH} COPY --from=node-builder /usr/app/server/ui /usr/app/server/ui # Build it RUN cargo build --release