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:
parent
bed22c74f5
commit
b73e252639
12 changed files with 192 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue