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

Commit

Permalink
Merge branch 'release/2.6.0-rc'
Browse files Browse the repository at this point in the history
  • Loading branch information
christianc1 committed Dec 18, 2019
2 parents 0c2f895 + 0b75ca0 commit 5559b21
Show file tree
Hide file tree
Showing 16 changed files with 365 additions and 135 deletions.
9 changes: 9 additions & 0 deletions global/config/mysql/config.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[mysqld]
max_allowed_packet = 1G
innodb_buffer_pool_size = 512M
query_cache_size = 0M
tmp_table_size = 32M
max_heap_table_size = 32M
query_cache_type = 0
innodb_file_per_table
max_connections = 20
6 changes: 5 additions & 1 deletion global/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: '2.4'
services:
# Run a local dnsmasq server for the containers that will resolve DNS queries and
# route any *.test domains to the gateway container
Expand All @@ -23,13 +23,16 @@ services:
mysql:
image: mysql:5
volumes:
- "./config/mysql/config.cnf:/etc/mysql/mysql.conf.d/wp-local-docker.cnf:ro"
- "mysqlData:/var/lib/mysql"
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
mem_limit: 1024M
mem_reservation: 1024M
networks:
- wplocaldocker
mailcatcher:
Expand Down Expand Up @@ -57,3 +60,4 @@ networks:
name: "wplocaldocker"
volumes:
mysqlData:
elasticsearchData:
6 changes: 3 additions & 3 deletions hosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const hostile = require( 'hostile' );
const commandUtils = require( './src/command-utils' );

const add = function( hosts ) {
hostile.set( '127.0.0.1', hosts, function( err ) {
hostile.set( '127.0.0.1', hosts.join(' '), function( err ) {
if (err) {
console.error(err)
} else {
Expand All @@ -14,7 +14,7 @@ const add = function( hosts ) {
};

const remove = function( hosts ) {
hostile.remove( '127.0.0.1', hosts, function( err ) {
hostile.remove( '127.0.0.1', hosts.join(' '), function( err ) {
if (err) {
console.error(err)
} else {
Expand All @@ -25,7 +25,7 @@ const remove = function( hosts ) {

const command = function() {
let mode = commandUtils.command();
let args = commandUtils.commandArgs();
let args = commandUtils.commandArgs( false );

switch( mode ) {
case 'add':
Expand Down
132 changes: 77 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-local-docker",
"version": "2.5.1",
"version": "2.6.0",
"description": "WP Local Docker",
"license": "MIT",
"main": "index.js",
Expand All @@ -20,14 +20,15 @@
"dependencies": {
"@sindresorhus/slugify": "^0.3.0",
"asyncro": "^3.0.0",
"chalk": "^2.4.1",
"fs-extra": "^7.0.0",
"chalk": "^2.4.2",
"fs-extra": "^7.0.1",
"hostile": "^1.3.2",
"inquirer": "^6.2.0",
"mysql": "^2.16.0",
"inquirer": "^6.5.2",
"mysql": "^2.17.1",
"read-yaml": "^1.1.0",
"sudo-prompt": "^8.2.0",
"update-check": "^1.5.2",
"shell-escape": "^0.2.0",
"sudo-prompt": "^8.2.5",
"update-check": "^1.5.3",
"write-yaml": "^1.0.0"
}
}
14 changes: 10 additions & 4 deletions src/command-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const envUtils = require( './env-utils' );
const path = require( 'path' );
const checkForUpdate = require('update-check');
const chalk = require( 'chalk' );
const shellEscape = require( 'shell-escape' );

const command = function() {
let command = process.argv[2];
Expand All @@ -13,10 +14,15 @@ const command = function() {
return process.argv[2].toLowerCase();
};

const commandArgs = function() {
let args = Array.prototype.slice.call( process.argv, 3 ).join( ' ' );

return args;
/**
* Get the command args, maybe shell escaping them. Set false for no escape.
* @param bool escape
* @returns string
*/
const commandArgs = function(escape = true) {
return (escape) ?
shellEscape( Array.prototype.slice.call( process.argv, 3 ) ) :
Array.prototype.slice.call( process.argv, 3 );
};

const subcommand = function() {
Expand Down
2 changes: 1 addition & 1 deletion src/config/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ server {
#{PROXY_URL}

# This should match upload_max_filesize in php.ini
client_max_body_size 100m;
client_max_body_size 150m;
}
Loading

0 comments on commit 5559b21

Please sign in to comment.