forked from testdrivenio/testdriven-app-2.5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
93 lines (86 loc) · 2.18 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
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
version: "3.7"
services:
users:
build:
context: ./services/users
dockerfile: Dockerfile-prod
expose:
- 5000
environment:
- FLASK_ENV=production
- 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
users-db:
build:
context: ./services/users/project/db
dockerfile: Dockerfile
expose:
- 5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
exercises:
build:
context: ./services/exercises
dockerfile: Dockerfile
volumes:
- "./services/exercises:/usr/src/app"
ports:
- 5002:5000
environment:
- FLASK_ENV=production
- APP_SETTINGS=project.config.ProductionConfig
- USERS_SERVICE_URL=http://users:5000
- DATABASE_URL=postgres://postgres:postgres@exercises-db:5432/exercises_prod
- DATABASE_TEST_URL=postgres://postgres:postgres@exercises-db:5432/exercises_test
- SECRET_KEY=${SECRET_KEY}
depends_on:
- users
- exercises-db
exercises-db:
build:
context: ./services/exercises/project/db
dockerfile: Dockerfile
ports:
- 5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
client:
container_name: client
build:
context: ./services/client
dockerfile: Dockerfile-prod
args:
- NODE_ENV=production
- REACT_APP_USERS_SERVICE_URL=${REACT_APP_USERS_SERVICE_URL}
- REACT_APP_API_GATEWAY_URL=${REACT_APP_API_GATEWAY_URL}
- REACT_APP_EXERCISES_SERVICE_URL=${REACT_APP_EXERCISES_SERVICE_URL}
expose:
- 80
depends_on:
- users
swagger:
build:
context: ./services/swagger
dockerfile: Dockerfile-prod
expose:
- 8080
environment:
- URL=swagger.json
depends_on:
- users
nginx:
build:
context: ./services/nginx
dockerfile: Dockerfile-prod
restart: always
ports:
- 80:80
depends_on:
- users
- client