From 5b33f8edf06243cc7605c32eef53850c66fa208f Mon Sep 17 00:00:00 2001 From: Michel Pereira Date: Tue, 24 Jan 2023 12:08:51 -0300 Subject: [PATCH] CHORE: Add compose-with-front.yml --- compose-with-front.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 compose-with-front.yml diff --git a/compose-with-front.yml b/compose-with-front.yml new file mode 100644 index 0000000..1ddfb03 --- /dev/null +++ b/compose-with-front.yml @@ -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