Adopt Compose v2 (#240)
* Adopt Compose v2 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
51
react-rust-postgres/compose.yaml
Normal file
51
react-rust-postgres/compose.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
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:
|
||||
- ADDRESS=0.0.0.0:8000
|
||||
- RUST_LOG=debug
|
||||
- PG_DBNAME=postgres
|
||||
- PG_HOST=db
|
||||
- PG_USER=postgres
|
||||
- PG_PASSWORD=mysecretpassword
|
||||
networks:
|
||||
- client-side
|
||||
- server-side
|
||||
volumes:
|
||||
- ./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: {}
|
||||
Reference in New Issue
Block a user