-
Notifications
You must be signed in to change notification settings - Fork 0
/
continuous-pipe.yml
205 lines (190 loc) · 5.59 KB
/
continuous-pipe.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
defaults:
cluster: ${CLUSTER}
environment:
name: '"demo-drupal8-" ~ code_reference.branch'
variables:
- name: CP_ENVIRONMENT
value: prod
pipelines:
- name: Remote Dev
condition: 'code_reference.branch matches "#^cpdev/#"'
tasks: &default_tasks
- images
- db_deployment
- setup
- web_deployment
variables:
- name: CP_ENVIRONMENT
value: dev
- name: Production
condition: 'not(code_reference.branch matches "#^cpdev/#")'
tasks: *default_tasks
variables: &review_variables
- name: CP_ENVIRONMENT
value: staging
- name: DEVELOPMENT_MODE
value: "false"
tasks:
images:
build:
services:
web:
image: ${IMAGE_NAME}
db_deployment:
deploy:
services:
database:
specification:
volumes:
- type: persistent
name: database-volume
capacity: 5Gi
storage_class: default
volume_mounts:
- name: database-volume
mount_path: /var/lib/mysql
command:
- /usr/local/bin/docker-entrypoint.sh
- mysqld
- --ignore-db-dir=lost+found
- --max_allowed_packet=128M
ports:
- 3306
resources:
requests:
cpu: 50m
memory: 250Mi
limits:
cpu: 500m
memory: 2Gi
environment_variables:
- name: MYSQL_ROOT_PASSWORD
value: ${DATABASE_ROOT_PASSWORD}
- name: MYSQL_USER
value: ${DATABASE_USER}
- name: MYSQL_PASSWORD
value: ${DATABASE_PASSWORD}
- name: MYSQL_DATABASE
value: ${DATABASE_NAME}
deployment_strategy:
readiness_probe:
type: tcp
port: 3306
web_deployment:
deploy:
services:
proxy:
endpoints:
-
name: proxy
cloud_flare_zone:
zone_identifier: ${CLOUD_FLARE_ZONE}
authentication:
email: ${CLOUD_FLARE_EMAIL}
api_key: ${CLOUD_FLARE_API_KEY}
proxied: true
record_suffix: '-demo-drupal8.continuouspipe.net'
ingress:
class: nginx
host_suffix: '-demo-drupal8.continuouspipe.net'
specification:
environment_variables:
- name: AUTH_HTTP_ENABLED
value: false
- name: AUTH_HTTP_HTPASSWD
value: ${AUTH_HTTP_HTPASSWD}
- name: AUTH_IP_WHITELIST_ENABLED
value: false
- name: AUTH_IP_WHITELIST
value: ${AUTH_IP_WHITELIST}
- name: TRUSTED_REVERSE_PROXIES
value: ${TRUSTED_REVERSE_PROXIES}
- name: WEB_REVERSE_PROXIED
value: "true"
- name: WEB_HTTPS_ONLY
value: "false"
ports:
- 80
- 443
resources:
requests:
cpu: 50m
memory: 50Mi
limits:
cpu: 1
memory: 200Mi
deployment_strategy:
readiness_probe:
type: tcp
port: 80
liveness_probe:
type: exec
command:
- curl
- -k
- -I
- -X GET
- -H
- "User-Agent: ContinuousPipe-HealthCheck v1.0"
- https://localhost/
initial_delay_seconds: 30
period_seconds: 30
success_threshold: 1
failure_threshold: 10
web:
specification:
volumes:
- type: persistent
name: web-public-files-volume
capacity: 5Gi
storage_class: default
volume_mounts:
- name: web-public-files-volume
mount_path: /app/docroot/sites/default/files
environment_variables: &default_web_variables
- name: DATABASE_NAME
value: ${DATABASE_NAME}
- name: DATABASE_USER
value: ${DATABASE_USER}
- name: DATABASE_PASSWORD
value: ${DATABASE_PASSWORD}
- name: CP_ENVIRONMENT
value: ${CP_ENVIRONMENT}
- name: INSTALL_DRUPAL
value: ${INSTALL_DRUPAL}
- name: DRUPAL_ADMIN_USERNAME
value: ${DRUPAL_ADMIN_USERNAME}
- name: DRUPAL_ADMIN_PASSWORD
value: ${DRUPAL_ADMIN_PASSWORD}
- name: DRUPAL_HASH_SALT
value: ${DRUPAL_HASH_SALT}
- name: DEVELOPMENT_MODE
value: ${DEVELOPMENT_MODE}
ports:
- 80
resources:
requests:
cpu: 50m
memory: 100Mi
limits:
cpu: 1
memory: 2G
varnish:
specification:
ports:
- 80
resources:
limits:
cpu: 50m
memory: 1Gi # Varnish is set to malloc,1g
deployment_strategy:
readiness_probe:
type: tcp
port: 80
setup:
run:
image:
from_service: web
commands:
- container setup
environment_variables: *default_web_variables