-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-prod.yml
66 lines (59 loc) · 1.65 KB
/
docker-compose-prod.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
version: '2.1'
services:
users-db:
container_name: users-db
build: https://github.com/repodevs/flask-microservices-users.git#master:project/db
ports:
- 5435:5432 # expose port - HOST:CONTAINER
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: exit 0
users-service:
container_name: users-service
build: https://github.com/repodevs/flask-microservices-users.git
expose:
- '5000'
environment:
- APP_SETTINGS=project.config.ProductionConfig
- DATABASE_URL=postgres://postgres:postgres@users-db:5432/users_prod
- DATABASE_TEST_URL=postgres://postgres:postgres@users-db:5432/users_test
- SECRET_KEY=${SECRET_KEY}
depends_on:
users-db:
condition: service_healthy
links:
- users-db
command: gunicorn -b 0.0.0.0:5000 manage:app
nginx:
container_name: nginx
build: ./nginx/
restart: always
ports:
- 80:80
depends_on:
users-service:
condition: service_started
web-service:
condition: service_started
links:
- users-service
- web-service
web-service:
container_name: web-service
build:
context: https://github.com/repodevs/flask-microservices-client.git
args:
- NODE_ENV=production
- REACT_APP_USERS_SERVICE_URL=${REACT_APP_USERS_SERVICE_URL}
ports:
- '9000:9000' # expose ports - HOST:CONTAINER
environment:
- NODE_ENV=development
- REACT_APP_USERS_SERVICE_URL=${REACT_APP_USERS_SERVICE_URL}
depends_on:
users-service:
condition: service_started
links:
- users-service