-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose-dev-with-front.yml
49 lines (44 loc) · 1.09 KB
/
compose-dev-with-front.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
services:
frontend:
build:
context: ../games-store-front
dockerfile: ../games-store-front/Dockerfile-with-back
ports:
- 3000:3000
depends_on:
- backend
environment:
- REACT_APP_API_HOST=backend
- REACT_APP_API_PORT=3001
- REACT_APP_WITH_BACK=true
- BROWSER=none
volumes:
- ../games-store-front/.:/myapp
networks:
- games-store-1
backend:
build:
context: .
dockerfile: ./Dockerfile-dev
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
volumes:
- .:/myapp
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