You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
953 B
YAML
52 lines
953 B
YAML
name: react-rust-postgres
|
|
services:
|
|
frontend:
|
|
build:
|
|
context: ../frontend
|
|
target: dev-envs
|
|
networks:
|
|
- client-side
|
|
ports:
|
|
- 3000:3000
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
backend:
|
|
build:
|
|
context: ../backend
|
|
target: dev-envs
|
|
environment:
|
|
- RUST_LOG=debug
|
|
- PG_DBNAME=postgres
|
|
- PG_HOST=db
|
|
- PG_USER=postgres
|
|
- PG_PASSWORD=mysecretpassword
|
|
- ADDRESS=0.0.0.0:8000
|
|
networks:
|
|
- client-side
|
|
- server-side
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
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: {}
|