Skip to content

Commit 25c40e7

Browse files
committed
Merge branch 'release/3.4.0'
2 parents b0100a9 + 6e214c1 commit 25c40e7

File tree

5 files changed

+22
-21
lines changed

5 files changed

+22
-21
lines changed

RoboFileBase.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ protected function readConfigFromEnv() {
129129

130130
// Environment.
131131
$config['environment']['hash_salt'] = getenv('HASH_SALT');
132-
$config['environment']['config_sync_dir'] = getenv('CONFIG_SYNC_DIRECTORY');
133132

134133
// Clean up NULL values and empty arrays.
135134
$array_clean = function (&$item) use (&$array_clean) {
@@ -155,7 +154,6 @@ public function build() {
155154
$start = new DateTime();
156155
$this->devComposerValidate();
157156
$this->buildMake();
158-
$this->buildCreateConfigSyncDir();
159157
$this->buildSetFilesOwner();
160158
$this->buildInstall();
161159
$this->configImportPlus();
@@ -197,19 +195,6 @@ public function buildMake($flags = '') {
197195
$this->checkFail($successful, "Composer install failed.");
198196
}
199197

200-
/**
201-
* Create the config sync directory from config.
202-
*
203-
* Drupal will write a .htaccess afterwards in there.
204-
*/
205-
public function buildCreateConfigSyncDir() {
206-
if (isset($this->config['environment']['config_sync_dir'])) {
207-
// Only do this if we have a config sync dir setting available.
208-
$this->say("Creating config sync directory.");
209-
$this->_exec("$this->sudo_cmd mkdir -p " . $this->config['environment']['config_sync_dir']);
210-
}
211-
}
212-
213198
/**
214199
* Set the owner and group of all files in the files dir to the web user.
215200
*/

docker-compose.linux.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ services:
1414
ports:
1515
- "80:8080"
1616
environment:
17-
CONFIG_SYNC_DIRECTORY: /shared/private/random-hash/sync
1817
DATABASE_HOST: db
1918
DATABASE_USER: user
2019
DATABASE_PASSWORD: password
@@ -25,6 +24,7 @@ services:
2524
PUBLIC_DIR: /shared/public
2625
REDIS_ENABLED: 1
2726
REDIS_HOST: redis
27+
# REDIS_PASSWORD: testing
2828
SHEPHERD_SITE_ID: 2
2929
SHEPHERD_INSTALL_PROFILE: ua
3030
SHEPHERD_SECRET_PATH: /code/private
@@ -66,6 +66,12 @@ services:
6666

6767
redis:
6868
image: redis:alpine
69+
command: |
70+
redis-server
71+
--maxmemory 512Mi
72+
--maxmemory-policy allkeys-lru
73+
--save ""
74+
# --requirepass password
6975
networks:
7076
- default
7177

docker-compose.osx.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ services:
1818
- "9990:9990"
1919
- "11211:11211"
2020
environment:
21-
CONFIG_SYNC_DIRECTORY: /shared/private/random-hash/sync
2221
HASH_SALT: random-hash
2322
MEMCACHE_ENABLED: 0
23+
PHP_IDE_CONFIG: serverName=localhost
2424
PUBLIC_DIR: /shared/public
2525
REDIS_ENABLED: 1
26+
# REDIS_PASSWORD: testing
2627
SHEPHERD_INSTALL_PROFILE: ua
2728
SHEPHERD_SITE_ID: 2
2829
SHEPHERD_SECRET_PATH: /code/private
@@ -33,7 +34,6 @@ services:
3334
SITE_ADMIN_EMAIL: [email protected]
3435
SITE_ADMIN_USERNAME: admin
3536
SITE_ADMIN_PASSWORD: password
36-
PHP_IDE_CONFIG: serverName=localhost
3737
XDEBUG_CONFIG: "remote_host=docker.for.mac.localhost"
3838
volumes:
3939
- nfsmount:/code
@@ -61,6 +61,12 @@ services:
6161

6262
redis:
6363
image: redis:alpine
64+
command: |
65+
redis-server
66+
--maxmemory 512Mi
67+
--maxmemory-policy allkeys-lru
68+
--save ""
69+
# --requirepass password
6470
network_mode: service:web
6571

6672
memcached:

dsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ dsh_project() {
105105
# Command: ./dsh pull
106106
# Fetches all images used by the project.
107107
dsh_pull() {
108-
docker-compose -f ${DOCKER_COMPOSE_FILE} pull
108+
docker-compose -f ${DOCKER_COMPOSE_FILE} pull --ignore-pull-failures
109+
docker-compose -f ${DOCKER_COMPOSE_FILE} build
109110
}
110111

111112
# Command: ./dsh nfs

src/Handler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function generateSettings()
162162
"\$settings['file_private_path'] = getenv('PRIVATE_DIR') ?: '/shared/private';\n" .
163163
"\$settings['file_temporary_path'] = getenv('TMP_DIR') ?: '/shared/tmp';\n" .
164164
"\$settings['hash_salt'] = getenv('HASH_SALT') ?: '" . str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(random_bytes(55))) . "';\n" .
165-
"\$config_directories['sync'] = getenv('CONFIG_SYNC_DIRECTORY') ?: DRUPAL_ROOT . '/../config-export';\n" .
165+
"\$config_directories['sync'] = DRUPAL_ROOT . '/../config-export';\n" .
166166
"\$settings['shepherd_site_id'] = getenv('SHEPHERD_SITE_ID');\n" .
167167
"\$settings['shepherd_url'] = getenv('SHEPHERD_URL');\n" .
168168
"\$settings['shepherd_token'] = getenv('SHEPHERD_TOKEN_FILE') ? file_get_contents(getenv('SHEPHERD_TOKEN_FILE')) : getenv('SHEPHERD_TOKEN');\n\n" .
@@ -177,9 +177,12 @@ public function generateSettings()
177177
" \$settings['cache_prefix']['default'] = getenv('REDIS_PREFIX') ?: '';\n" .
178178
" // If we're not installing, include the redis services.\n" .
179179
" if (!isset(\$GLOBALS['install_state'])) {\n" .
180-
" \$settings['cache']['default'] = 'cache.backend.redis';\n\n" .
180+
" \$settings['cache']['default'] = 'cache.backend.redis';\n" .
181181
" \$settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml';\n" .
182182
" }\n" .
183+
" if (getenv('REDIS_PASSWORD_FILE') || getenv('REDIS_PASSWORD')) {\n" .
184+
" \$settings['redis.connection']['password'] = getenv('REDIS_PASSWORD_FILE') ? file_get_contents(getenv('REDIS_PASSWORD_FILE')) : getenv('REDIS_PASSWORD');\n" .
185+
" }\n" .
183186
"}\n" .
184187
"if (getenv('MEMCACHE_ENABLED')) {\n" .
185188
" \$settings['memcache']['servers'] = [getenv('MEMCACHE_HOST') . ':11211' => 'default'] ?: ['127.0.0.1:11211' => 'default'];\n" .

0 commit comments

Comments
 (0)