CHORE: Add compose-with-front.yml
This commit is contained in:
parent
c09686be4b
commit
5b33f8edf0
1 changed files with 40 additions and 0 deletions
40
compose-with-front.yml
Normal file
40
compose-with-front.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
|
||||
services:
|
||||
frontend:
|
||||
build: ../games-store-front
|
||||
ports:
|
||||
- 3000:3000
|
||||
depends_on:
|
||||
- backend
|
||||
environment:
|
||||
- REACT_APP_API_HOST=backend
|
||||
- REACT_APP_API_PORT=3001
|
||||
- BROWSER=none
|
||||
networks:
|
||||
- games-store-1
|
||||
|
||||
backend:
|
||||
build: .
|
||||
ports:
|
||||
- 3001:3001 # A porta da direita precisa ser igual a da variável PORT.
|
||||
depends_on:
|
||||
- database
|
||||
environment:
|
||||
- DB_HOST=database # Se mudar valor dessa variável, tem que mudar o nome do serviço "database" igualmente E VICE-VERSA; remover nem pensar.
|
||||
- DB_NAME=GamesStore
|
||||
- PORT=3001
|
||||
networks:
|
||||
- games-store-1
|
||||
- games-store-2
|
||||
|
||||
database:
|
||||
build: models/
|
||||
networks:
|
||||
- games-store-2
|
||||
|
||||
|
||||
networks:
|
||||
games-store-1:
|
||||
name: games-store-front
|
||||
games-store-2:
|
||||
name: games-store-db
|
Loading…
Reference in a new issue