2023-03-30 17:08:41 -05:00
|
|
|
FROM rust:alpine
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2023-03-31 06:21:59 -05:00
|
|
|
RUN apk add git musl-dev
|
2023-03-30 17:08:41 -05:00
|
|
|
|
2023-04-01 15:28:15 -05:00
|
|
|
COPY data/ data/
|
2023-03-30 17:08:41 -05:00
|
|
|
COPY public/ public/
|
2023-04-01 15:28:15 -05:00
|
|
|
COPY rust-letter-be/ rust-letter-be/
|
|
|
|
|
|
|
|
# We don't need all the front end directory files
|
|
|
|
RUN mkdir rust-letter-fe
|
|
|
|
COPY rust-letter-fe/src/ rust-letter-fe/src/
|
|
|
|
COPY rust-letter-fe/Cargo.toml rust-letter-fe/Cargo.toml
|
|
|
|
|
2023-03-30 17:08:41 -05:00
|
|
|
COPY src/ src/
|
|
|
|
COPY templates/ templates/
|
2023-04-01 15:28:15 -05:00
|
|
|
COPY Cargo.toml .
|
|
|
|
COPY Rocket.toml .
|
2023-03-30 17:08:41 -05:00
|
|
|
|
|
|
|
RUN cargo install --config "net.git-fetch-with-cli=true" --path .
|
|
|
|
|
2023-04-01 15:28:15 -05:00
|
|
|
ENV RUST_ADDRESS=0.0.0.0
|
|
|
|
ENV RUST_PORT=3469
|
|
|
|
|
|
|
|
CMD ["cargo", "run", "--release"]
|