diff --git a/README.md b/README.md index 80a4887..fcdae26 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,14 @@ Putting this into wordpress. -## Vagrant +## Vagrant/Docker + +Choices for local development are Docker and Vagrant. + +``` +# Replace {env} with your desired environment, most likely "local" +docker-compose -f docker-compose-{env}.yml up -d +``` Wordpress development on [Vagrant](https://www.vagrantup.com/docs/installation/) @@ -15,7 +22,7 @@ vagrant up The above will create a local site at [http://ation.local](http://ation.local/) that points to the `www` folder. -## Production + ## Development -Development started with node v5. +Development started with [node](https://nodejs.org/en/) v5, and also utilizes [composer](https://getcomposer.org/doc/00-intro.md/). ``` cd www/wp-content/themes/ation2016 npm install +composer install ``` Then use `gulp` to develop, it watches the `src/images/`, `src/styles/`, and `src/scripts/` folders and compiles their production version to the `static/` directory. @@ -44,6 +52,7 @@ Our relevant project structure is as follows: ``` /ationframework + /docker-compose-{env}.yml # Docker Compose Files per environment /www /wp-env # Holds environment specific wordpress variables (db) /wp-content diff --git a/docker-compose-local.yml b/docker-compose-local.yml index b3b7014..1e7fedd 100644 --- a/docker-compose-local.yml +++ b/docker-compose-local.yml @@ -8,5 +8,10 @@ wordpress: db: image: mysql + ports: + - "3306:3306" environment: - MYSQL_ROOT_PASSWORD: wordpresspw \ No newline at end of file + MYSQL_ROOT_PASSWORD: wordpresspw + MYSQL_USER: ation + MYSQL_PASSWORD: ationmedia + MYSQL_DATABASE: ation \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 67523e6..caf6e47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ wordpress: - image: wordpress:4.5-apache + image: wordpress:4.6-apache ports: - 80:80 volumes: diff --git a/env/local.env b/env/local.env index 391afd1..33b3bf4 100644 --- a/env/local.env +++ b/env/local.env @@ -1,4 +1,3 @@ -WORDPRESS_DB_HOST=develop.digitalmediauconn.org WORDPRESS_DB_USER=ation WORDPRESS_DB_PASSWORD=ationmedia WORDPRESS_DB_NAME=ation diff --git a/www/.htaccess b/www/.htaccess index 00b5c45..e303c53 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -8,7 +8,5 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] -php_value upload_max_filesize 64M -php_value post_max_size 64M -php_value memory_limit 64M + # END WordPress \ No newline at end of file diff --git a/www/wp-config.php b/www/wp-config.php index eb19437..d4cf89a 100644 --- a/www/wp-config.php +++ b/www/wp-config.php @@ -178,7 +178,7 @@ define('DB_PASSWORD', 'ationmedia'); - define('DB_HOST', 'develop.digitalmediauconn.org'); + define('DB_HOST', 'mysql'); define('DB_CHARSET', 'utf8'); @@ -286,11 +286,10 @@ if ( !defined('ABSPATH') ) - define('ABSPATH', dirname(__FILE__) . '/'); + define('ABSPATH', dirname(__FILE__) . '/'); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php'); - diff --git a/www/wp-env/ation.develop.digitalmediauconn.org.php b/www/wp-env/ation.develop.digitalmediauconn.org.php index cf6c2bc..aa5d5f6 100644 --- a/www/wp-env/ation.develop.digitalmediauconn.org.php +++ b/www/wp-env/ation.develop.digitalmediauconn.org.php @@ -8,7 +8,7 @@ define('DB_PASSWORD', 'ationmedia'); /** MySQL hostname */ -define('DB_HOST', 'develop.digitalmediauconn.org'); +define('DB_HOST', '127.0.0.1'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); @@ -16,8 +16,8 @@ /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); -define('WP_HOME', 'http://ation.develop.digitalmediauconn.org/www'); -define('WP_SITEURL', 'http://ation.develop.digitalmediauconn.org/www'); +define('WP_HOME', 'http://ation.develop.digitalmediauconn.org'); +define('WP_SITEURL', 'http://ation.develop.digitalmediauconn.org'); /** WP content directory */ define('WP_CONTENT_URL', WP_HOME . '/wp-content'); diff --git a/www/wp-env/ation.local.php b/www/wp-env/ation.local.php index 42d1b80..a9dc676 100644 --- a/www/wp-env/ation.local.php +++ b/www/wp-env/ation.local.php @@ -8,7 +8,7 @@ define('DB_PASSWORD', 'ationmedia'); /** MySQL hostname */ -define('DB_HOST', 'develop.digitalmediauconn.org'); +define('DB_HOST', 'mysql'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8');