Skip to content

Commit

Permalink
Add sample config to docker-compose files.
Browse files Browse the repository at this point in the history
  • Loading branch information
singularo committed Jun 17, 2019
1 parent c3e4370 commit 680b7ef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docker-compose.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
PUBLIC_DIR: /shared/public
REDIS_ENABLED: 1
REDIS_HOST: redis
# REDIS_PASSWORD: testing
SHEPHERD_SITE_ID: 2
SHEPHERD_INSTALL_PROFILE: ua
SHEPHERD_SECRET_PATH: /code/private
Expand Down Expand Up @@ -66,6 +67,12 @@ services:

redis:
image: redis:alpine
command: |
redis-server
--maxmemory 512Mi
--maxmemory-policy allkeys-lru
--save ""
# --requirepass password
networks:
- default

Expand Down
9 changes: 8 additions & 1 deletion docker-compose.osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ services:
CONFIG_SYNC_DIRECTORY: /shared/private/random-hash/sync
HASH_SALT: random-hash
MEMCACHE_ENABLED: 0
PHP_IDE_CONFIG: serverName=localhost
PUBLIC_DIR: /shared/public
REDIS_ENABLED: 1
# REDIS_PASSWORD: testing
SHEPHERD_INSTALL_PROFILE: ua
SHEPHERD_SITE_ID: 2
SHEPHERD_SECRET_PATH: /code/private
Expand All @@ -33,7 +35,6 @@ services:
SITE_ADMIN_EMAIL: [email protected]
SITE_ADMIN_USERNAME: admin
SITE_ADMIN_PASSWORD: password
PHP_IDE_CONFIG: serverName=localhost
XDEBUG_CONFIG: "remote_host=docker.for.mac.localhost"
volumes:
- nfsmount:/code
Expand Down Expand Up @@ -61,6 +62,12 @@ services:

redis:
image: redis:alpine
command: |
redis-server
--maxmemory 512Mi
--maxmemory-policy allkeys-lru
--save ""
# --requirepass password
network_mode: service:web

memcached:
Expand Down
2 changes: 1 addition & 1 deletion src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function generateSettings()
" \$settings['cache_prefix']['default'] = getenv('REDIS_PREFIX') ?: '';\n" .
" // If we're not installing, include the redis services.\n" .
" if (!isset(\$GLOBALS['install_state'])) {\n" .
" \$settings['cache']['default'] = 'cache.backend.redis';\n\n" .
" \$settings['cache']['default'] = 'cache.backend.redis';\n" .
" \$settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml';\n" .
" }\n" .
" if (getenv('REDIS_PASSWORD_FILE') || getenv('REDIS_PASSWORD')) {\n" .
Expand Down

0 comments on commit 680b7ef

Please sign in to comment.