docker-compose.yaml
version: '3'
services:
app:
image: frontend:trabalhofinal
build:
context: client
dockerfile: Dockerfile
volumes:
- './client:/client'
- '/client/node_modules/'
ports:
- '8080:8080'
depends_on:
- api
api:
image: backend:trabalhofinal
build:
context: api
dockerfile: Dockerfile
environment:
POSTGRES_HOST: db
volumes:
- './api:/api'
ports:
- '8000:8000'
depends_on:
- db
db:
image: postgres:12
environment:
POSTGRES_DB: myproject
POSTGRES_USER: myuser
POSTGRES_PASSWORD: password
ports:
- '5432:5432'