2022-07-08 15:54:08 +00:00
|
|
|
name: react-rust-postgres
|
2020-03-23 13:00:43 +00:00
|
|
|
services:
|
2020-03-26 09:39:45 +00:00
|
|
|
frontend:
|
|
|
|
build:
|
|
|
|
context: frontend
|
|
|
|
target: development
|
|
|
|
networks:
|
|
|
|
- client-side
|
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
volumes:
|
|
|
|
- ./frontend/src:/code/src:ro
|
2021-07-06 17:00:16 +00:00
|
|
|
|
2020-03-23 13:00:43 +00:00
|
|
|
backend:
|
|
|
|
build:
|
|
|
|
context: backend
|
|
|
|
target: development
|
2020-03-26 09:39:45 +00:00
|
|
|
environment:
|
2021-07-06 17:00:16 +00:00
|
|
|
- ADDRESS=0.0.0.0:8000
|
|
|
|
- RUST_LOG=debug
|
|
|
|
- PG_DBNAME=postgres
|
|
|
|
- PG_HOST=db
|
|
|
|
- PG_USER=postgres
|
|
|
|
- PG_PASSWORD=mysecretpassword
|
2020-03-23 13:00:43 +00:00
|
|
|
networks:
|
2020-03-26 09:39:45 +00:00
|
|
|
- client-side
|
2020-03-23 13:00:43 +00:00
|
|
|
- server-side
|
|
|
|
volumes:
|
2020-03-26 09:39:45 +00:00
|
|
|
- ./backend/src:/code/src
|
2020-03-23 13:00:43 +00:00
|
|
|
- backend-cache:/code/target
|
2020-03-26 09:39:45 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
2021-07-06 17:00:16 +00:00
|
|
|
|
2020-03-26 09:39:45 +00:00
|
|
|
db:
|
|
|
|
image: postgres:12-alpine
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=mysecretpassword
|
|
|
|
networks:
|
|
|
|
- server-side
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
volumes:
|
|
|
|
- db-data:/var/lib/postgresql/data
|
2021-07-06 17:00:16 +00:00
|
|
|
|
2020-03-23 13:00:43 +00:00
|
|
|
networks:
|
|
|
|
client-side: {}
|
|
|
|
server-side: {}
|
2021-07-06 17:00:16 +00:00
|
|
|
|
2020-03-23 13:00:43 +00:00
|
|
|
volumes:
|
|
|
|
backend-cache: {}
|
2020-03-26 09:39:45 +00:00
|
|
|
db-data: {}
|