-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathharness.yml
114 lines (113 loc) · 3.27 KB
/
harness.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
---
harness('inviqa/drupal'):
description: A docker based development environment for drupal
parentLayers:
- inviqa/docker:v0.4.0
require:
services:
- proxy
- mail
confd:
- harness:/
---
attributes:
app:
web_owner: www-data
web_group: www-data
web_writable_dirs:
- '/app/docroot/sites/default/files'
web_directory: = '/app/' ~ @('drupal.docroot')
files_directory: = @('app.web_directory') ~ '/sites/default/files'
drupal:
salt: 2tkqCCRKy5rT4wMVz8KTCh8r3sJGkL5v
docroot: docroot
major_version: '9'
nginx:
php_fpm:
conf:
fastcgi_buffers: 1024 4k
fastcgi_buffer_size: 32k
database:
user: drupal
pass: drupal
name: drupal
backend:
build:
steps:
- task composer:install
install:
steps:
- |
passthru drush site:install standard \
--locale=en \
--site-name=Drupal \
"--site-mail=${ADMIN_EMAIL}" \
\
"--account-name=${ADMIN_USERNAME}" \
"--account-mail=${ADMIN_EMAIL}" \
"--account-pass=${ADMIN_DEFAULT_PASSWORD}" \
--yes
- run chmod 755 /app/docroot/sites/default
- task overlay:apply
- task assets:dump
migrate:
steps:
- run drush cache:rebuild
- passthru drush updatedb --yes
- run drush cache:rebuild
cron:
jobs:
- = '*/5 * * * * /cron-run-with-env.sh /app/bin/drush --root="/app/' ~ @('drupal.docroot') ~ '" cron'
php:
install_extensions:
- "= @('services.blackfire.enabled') ? 'blackfire' : ''"
- "= @('services.tideways.enabled') ? 'tideways' : ''"
- memcached
- redis
cli:
ini:
opcache.file_cache_only: '0'
version: >
= version_compare(@('drupal.major_version'), '10', '>=') ? '8.1'
: version_compare(@('drupal.major_version'), '9', '>=') ? '8.0'
: '7.4'
persistence:
drupal-files:
enabled: true
claimName: drupal-files-pvc
mountPath: = @('app.files_directory')
accessMode: ReadWriteMany # the requirement if persistence is enabled
#storageClass: "..." most clusters need a custom storageclass
size: 1Gi
services:
chrome:
enabled: true
lighthouse:
enabled: true
mysql:
enabled: true
redis:
enabled: true
---
command('drush %'):
exec: |
#!bash(workspace:/)|=
passthru ws exec drush --root=/app/={ @('drupal.docroot') } ={ input.argument('%') }
---
command('test-unit'):
env:
COMPOSE_BIN: = @('docker.compose.bin')
exec: |
#!bash(workspace:/)|=
$COMPOSE_BIN exec -T -u root php-fpm bash -c 'mkdir -p /app/docroot/sites/simpletest'
$COMPOSE_BIN exec -T -u root php-fpm bash -c 'chown -R www-data:www-data /app/docroot/sites/simpletest'
if ! $COMPOSE_BIN exec -T -u root php-fpm bash -c '[ -f /app/bin/phpunit ]'; then
run "$COMPOSE_BIN cp console:/app/bin - | $COMPOSE_BIN cp - php-fpm:/app/"
run "$COMPOSE_BIN cp console:/app/vendor - | $COMPOSE_BIN cp - php-fpm:/app/"
fi
passthru $COMPOSE_BIN exec -T -u www-data php-fpm bash -c 'bin/phpunit'
---
import:
- harness/config/*.yml
- harness/attributes/*.yml
- harness/attributes/environment/={env('MY127WS_ENV','local')}.yml