forked from mjhea0/microservice-movies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-review.yml
102 lines (95 loc) · 2.8 KB
/
docker-compose-review.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: '2.1'
services:
users-db-review:
container_name: users-db-review
build: ./services/users/src/db
ports:
- '5433:5432' # expose ports - HOST:CONTAINER
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: exit 0
movies-db-review:
container_name: movies-db-review
build: ./services/movies/src/db
ports:
- '5434:5432' # expose ports - HOST:CONTAINER
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: exit 0
users-service-review:
container_name: users-service-review
build:
context: ./services/users/
dockerfile: Dockerfile-review
ports:
- '3000:3000' # expose ports - HOST:CONTAINER
environment:
- DATABASE_URL=postgres://postgres:postgres@users-db-review:5432/users_dev
- DATABASE_TEST_URL=postgres://postgres:postgres@users-db-review:5432/users_test
- NODE_ENV=${NODE_ENV}
- TOKEN_SECRET=changeme
depends_on:
users-db-review:
condition: service_healthy
links:
- users-db-review
movies-service-review:
container_name: movies-service-review
build:
context: ./services/movies/
dockerfile: Dockerfile-review
ports:
- '3001:3000' # expose ports - HOST:CONTAINER
environment:
- DATABASE_URL=postgres://postgres:postgres@movies-db-review:5432/movies_dev
- DATABASE_TEST_URL=postgres://postgres:postgres@movies-db-review:5432/movies_test
- NODE_ENV=${NODE_ENV}
- TOKEN_SECRET=changeme
depends_on:
movies-db-review:
condition: service_healthy
users-service-review:
condition: service_started
links:
- movies-db-review
- users-service-review
web-service-review:
container_name: web-service-review
build:
context: ./services/web/
dockerfile: Dockerfile-review
ports:
- '3007:9000' # expose ports - HOST:CONTAINER
environment:
- NODE_ENV=${NODE_ENV}
- REACT_APP_USERS_SERVICE_URL=${REACT_APP_USERS_SERVICE_URL}
- REACT_APP_MOVIES_SERVICE_URL=h${REACT_APP_MOVIES_SERVICE_URL}
depends_on:
users-service-review:
condition: service_started
movies-service-review:
condition: service_started
links:
- users-service-review
- movies-service-review
swagger-review:
container_name: swagger-review
build:
context: ./services/movies/swagger/
dockerfile: Dockerfile-review
ports:
- '3003:3001' # expose ports - HOST:CONTAINER
environment:
- NODE_ENV=${NODE_ENV}
depends_on:
users-service-review:
condition: service_started
movies-service-review:
condition: service_started
links:
- users-service-review
- movies-service-review