1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-26 02:38:07 +02:00

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:
Jérémie Drouet 2020-03-26 10:39:45 +01:00
parent bed22c74f5
commit b73e252639
12 changed files with 192 additions and 6 deletions

View file

@ -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