react-rust-postgres: add connection to postgres with migrations
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
FROM jdrouet/rust-nightly:buster-slim AS base
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV USER=root
|
||||
ENV ROCKET_ADDRESS=0.0.0.0
|
||||
ENV ROCKET_ENV=development
|
||||
|
||||
WORKDIR /code
|
||||
RUN cargo init
|
||||
@@ -21,6 +26,8 @@ RUN cargo build --release --offline
|
||||
|
||||
FROM debian:buster-slim
|
||||
|
||||
ENV ROCKET_ENV=production
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
COPY --from=builder /code/target/release/react-rust-postgres /react-rust-postgres
|
||||
|
Reference in New Issue
Block a user