-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.ci.yml
130 lines (116 loc) · 3.83 KB
/
docker-compose.ci.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: "3.9"
x-common-args: &common-args
DEPLOYMENT_ENVIRONMENT: development
x-common-environment: &common-environment
ACCESS_TOKEN_PUBLIC_KEY_PEM: |
-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEN60b96+vHHiVRHD02BnbaarnMQHe0pNk
wnch0vkKkADmh9hHc/6cirDZDDr505/o+RHkdI01bRL/dODYOgv5ofa0XR1S3Uug
pYrUr68jGm/Zbmi9BgzCbt9DPkOcCd5W
-----END PUBLIC KEY-----
ALLOWED_ORIGINS: http://front-end-nginx
DATABASE_URL: postgresql+asyncpg://arad_application:arad_application@database:5432/arad_application
LISTEN_IP: "0.0.0.0"
x-healthcheck: &healthcheck
test: ["CMD-SHELL", "curl http://localhost/health > /dev/null"]
interval: 5s
timeout: 5s
retries: 5
x-database-dependency: &database-dependency
database:
condition: service_healthy
services:
e2e-client:
image: "${DOCKERHUB_USER}/${CIRCLE_PROJECT_REPONAME}:front-end-react-${CIRCLE_BRANCH}-${GIT_REVISION}"
depends_on:
front-end-nginx:
condition: service_healthy
front-end-nginx:
image: "${DOCKERHUB_USER}/${CIRCLE_PROJECT_REPONAME}:front-end-nginx-${CIRCLE_BRANCH}-${GIT_REVISION}"
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl http://localhost/health > /dev/null"]
interval: 5s
timeout: 5s
retries: 5
api:
image: "${DOCKERHUB_USER}/${CIRCLE_PROJECT_REPONAME}:api-${CIRCLE_BRANCH}-${GIT_REVISION}"
depends_on:
identity:
condition: service_healthy
reader:
condition: service_healthy
reviewer:
condition: service_healthy
administrator:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl http://localhost/health > /dev/null"]
interval: 5s
timeout: 5s
retries: 5
identity:
image: "${DOCKERHUB_USER}/${CIRCLE_PROJECT_REPONAME}:identity-${CIRCLE_BRANCH}-${GIT_REVISION}"
restart: always
environment:
<<: *common-environment
DATABASE_URL: postgresql+asyncpg://arad_user:arad_user@database:5432/arad_user
CACHE_URL: redis://cache:6379/0
DEFAULT_ADMIN_EMAIL: [email protected]
ACCESS_TOKEN_PRIVATE_KEY_PEM: |
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDDjQPP27NwYB6EuNB/V4lUTjgcQgWNdX5T/n6iogIkNzF2ieKyYjAe1
6+dKIhGyqK+gBwYFK4EEACKhZANiAAQ3rRv3r68ceJVEcPTYGdtpqucxAd7Sk2TC
dyHS+QqQAOaH2Edz/pyKsNkMOvnTn+j5EeR0jTVtEv904Ng6C/mh9rRdHVLdS6Cl
itSvryMab9luaL0GDMJu30M+Q5wJ3lY=
-----END EC PRIVATE KEY-----
depends_on:
<<: *database-dependency
cache:
condition: service_healthy
healthcheck: *healthcheck
reader:
image: "${DOCKERHUB_USER}/${CIRCLE_PROJECT_REPONAME}:reader-${CIRCLE_BRANCH}-${GIT_REVISION}"
restart: always
environment: *common-environment
depends_on: *database-dependency
healthcheck: *healthcheck
reviewer:
image: "${DOCKERHUB_USER}/${CIRCLE_PROJECT_REPONAME}:reviewer-${CIRCLE_BRANCH}-${GIT_REVISION}"
restart: always
environment: *common-environment
depends_on: *database-dependency
healthcheck: *healthcheck
administrator:
image: "${DOCKERHUB_USER}/${CIRCLE_PROJECT_REPONAME}:administrator-${CIRCLE_BRANCH}-${GIT_REVISION}"
restart: always
environment: *common-environment
depends_on: *database-dependency
healthcheck: *healthcheck
cache:
image: "redis:bullseye"
restart: always
volumes:
- 'cache:/bitnami/redis/data'
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 5s
timeout: 5s
retries: 5
database:
image: "postgres:14-bullseye"
restart: always
environment:
POSTGRES_PASSWORD: passphrase
volumes:
- 'database:/var/lib/postgresql/data'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
cache:
database: