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,16 +1,43 @@
|
|||
version: "3.7"
|
||||
services:
|
||||
frontend:
|
||||
build:
|
||||
context: frontend
|
||||
target: development
|
||||
networks:
|
||||
- client-side
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- ./frontend/src:/code/src:ro
|
||||
backend:
|
||||
build:
|
||||
context: backend
|
||||
target: development
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:mysecretpassword@db/postgres
|
||||
networks:
|
||||
- client-side
|
||||
- server-side
|
||||
volumes:
|
||||
- ./backend/src:/code/src:ro
|
||||
- ./backend/src:/code/src
|
||||
- backend-cache:/code/target
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: postgres:12-alpine
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=mysecretpassword
|
||||
networks:
|
||||
- server-side
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
client-side: {}
|
||||
server-side: {}
|
||||
volumes:
|
||||
backend-cache: {}
|
||||
db-data: {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue