Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Redis #118

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Redis #118

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const createEnv = async function() {
'memcached': {
'image': images['memcached'],
},
'redis': {
'image': images['redis'],
},
'nginx': {
'image': images['nginx'],
'expose': [
Expand Down Expand Up @@ -267,6 +270,7 @@ const createEnv = async function() {
],
'depends_on': [
'memcached',
'redis'
],
'networks': [
'default',
Expand All @@ -279,7 +283,7 @@ const createEnv = async function() {

// Unlike Mac and Windows, Docker is a first class citizen on Linux
// and doesn't have any kind of translation layer between users and the
// file system. Because of this the phpfpm container will be running as the
// file system. Because of this the phpfpm container will be running as the
// wrong user. Here we setup the docker-compose.yml file to rebuild the
// phpfpm container so that it runs as the user who created the project.
if ( os.platform() == 'linux' ) {
Expand All @@ -296,7 +300,7 @@ const createEnv = async function() {
baseConfig.services.phpfpm.volumes.push( `~/.ssh:/home/${process.env.USER}/.ssh:cached` );
}
else {
// the official containers for this project will have a www-data user.
// the official containers for this project will have a www-data user.
baseConfig.services.phpfpm.volumes.push( '~/.ssh:/home/www-data/.ssh:cached' );
}

Expand Down
7 changes: 4 additions & 3 deletions src/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const images = {
'wpsnapshots': '10up/wpsnapshots:dev',
'memcached': 'memcached:latest',
'nginx': 'nginx:latest',
'elasticsearch': 'docker.elastic.co/elasticsearch/elasticsearch:5.6.16'
'elasticsearch': 'docker.elastic.co/elasticsearch/elasticsearch:5.6.16',
'redis': 'redis:latest'
};

const help = function() {
Expand All @@ -38,9 +39,9 @@ Updates any docker images used by your environment to the latest versions availa
};

const update = function( image ) {
try {
try {
execSync( `docker pull ${image}`, { stdio: 'inherit' } );
}
}
catch ( ex ) {

}
Expand Down