-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (70 loc) · 1.79 KB
/
docker-compose.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3.7'
volumes:
broker_db_data:
services:
api:
container_name: ${PROJECT:-microservices-in-action}-api
image: microservices-in-action/api:dev
build:
context: ./services/api
dockerfile: ./deployments/api.dev.dockerfile
ports:
- '3000:3000'
environment:
- BROKER_URL=http://localhost:9292
- BROKER_USERNAME=$USER
- BROKER_PASSWORD=$USER
volumes:
- type: bind
source: ./services/api
target: /go/src/app
restart: on-failure
ui:
container_name: ${PROJECT:-microservices-in-action}-ui
image: microservices-in-action/ui:dev
build:
context: ./services/ui
dockerfile: ./deployments/ui.dev.dockerfile
ports:
- '8080:8080'
environment:
- NODE_ENV=development
- API_BASE_URL=http://localhost:3000
- BROKER_URL=http://localhost:9292
- BROKER_USERNAME=$USER
- BROKER_PASSWORD=$USER
volumes:
- type: bind
source: ./services/ui
target: /app
tty: true
restart: on-failure
depends_on:
- api
broker-db:
container_name: broker-db
image: postgres:12
ports:
- '5432:5432'
environment:
- POSTGRES_USER=$USER
- POSTGRES_PASSWORD=$USER
- POSTGRES_DB=postgres
volumes:
- type: volume
source: broker_db_data
target: /var/lib/postgresql/data
broker:
container_name: broker
image: pactfoundation/pact-broker:latest
ports:
- '9292:9292'
environment:
- PACT_BROKER_DATABASE_URL=postgresql://${USER}:${USER}@broker-db:5432/postgres
- PACT_BROKER_BASIC_AUTH_USERNAME=${USER}
- PACT_BROKER_BASIC_AUTH_PASSWORD=${USER}
- PACT_BROKER_LOG_LEVEL=INFO
- PACT_BROKER_PORT=9292
restart: on-failure
depends_on:
- broker-db