Dockerised the app
Good use of env vars now Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
parent
5fc487c705
commit
ea790a066a
2 changed files with 34 additions and 0 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
FROM rustlang/rust:nightly-slim AS builder
|
||||
WORKDIR app
|
||||
COPY . .
|
||||
RUN cargo build --release
|
||||
|
||||
FROM debian:buster-slim AS runtime
|
||||
WORKDIR app
|
||||
RUN apt-get update -y \
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /app/target/release/bin bin
|
||||
RUN mkdir -p upload
|
||||
COPY ./templates templates
|
||||
ENV ROCKET_ADDRESS=0.0.0.0
|
||||
ENV ROCKET_PORT=6162
|
||||
|
||||
ENTRYPOINT ["./bin"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue