Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
489 changed files
with
6,011 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[{*.php,*.js,*.css}] | ||
indent_style = tab | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.DS_Store | ||
.ansible | ||
.bundle | ||
.envrc | ||
.github/ | ||
.idea/ | ||
.travis.yml | ||
.vagrant | ||
npm-debug.log | ||
package.box | ||
playbook.retry | ||
!*.gitignore | ||
/wordpress/.editorconfig | ||
/wordpress/.htaccess | ||
/wordpress/index.php | ||
/wordpress/license.txt | ||
/wordpress/readme.html | ||
/wordpress/sitemap.xml | ||
/wordpress/sitemap.xml.gz | ||
/wordpress/wp-activate.php | ||
/wordpress/wp-blog-header.php | ||
/wordpress/wp-comments-post.php | ||
/wordpress/wp-config-sample.php | ||
/wordpress/wp-config.php | ||
/wordpress/wp-cron.php | ||
/wordpress/wp-links-opml.php | ||
/wordpress/wp-load.php | ||
/wordpress/wp-login.php | ||
/wordpress/wp-mail.php | ||
/wordpress/wp-settings.php | ||
/wordpress/wp-signup.php | ||
/wordpress/wp-trackback.php | ||
/wordpress/xmlrpc.php | ||
/wordpress/wp-admin/ | ||
/wordpress/wp-content/advanced-cache.php | ||
/wordpress/wp-content/backup-db/ | ||
/wordpress/wp-content/backups/ | ||
/wordpress/wp-content/blogs.dir/ | ||
/wordpress/wp-content/cache/ | ||
/wordpress/wp-content/languages/ | ||
/wordpress/wp-content/plugins/ | ||
#/wordpress/wp-content/themes/ | ||
/wordpress/wp-content/themes/index.php | ||
/wordpress/wp-content/themes/twentyfifteen/ | ||
/wordpress/wp-content/themes/twentyseventeen/ | ||
/wordpress/wp-content/themes/twentysixteen/ | ||
/wordpress/wp-content/upgrade/ | ||
#/wordpress/wp-content/uploads/ | ||
/wordpress/wp-content/wp-cache-config.php | ||
/wordpress/wp-content/index.php | ||
/wordpress/wp-includes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
local: | ||
vhost: "http://vccw.local" | ||
wordpress_path: "/var/www/html" # use an absolute path here | ||
|
||
database: | ||
name: "wordpress" | ||
user: "wordpress" | ||
password: "wordpress" | ||
host: "localhost" | ||
charset: "utf8" | ||
|
||
# paths: # you can customize wordpress internal paths | ||
# wp_content: "wp-content" | ||
# uploads: "wp-content/uploads" | ||
# plugins: "wp-content/plugins" | ||
# mu_plugins: "wp-content/mu-plugins" | ||
# themes: "wp-content/themes" | ||
# languages: "wp-content/languages" | ||
|
||
production: | ||
vhost: "http://example.com" | ||
wordpress_path: "/var/www/your_site" # use an absolute path here | ||
|
||
database: | ||
name: "database_name" | ||
user: "user" | ||
password: "password" | ||
host: "host" | ||
port: "3308" # Use just in case you have exotic server config | ||
mysqldump_options: "--max_allowed_packet=50MB" # Only available if using SSH | ||
|
||
exclude: | ||
- ".git/" | ||
- ".gitignore" | ||
- ".sass-cache/" | ||
- "bin/" | ||
- "tmp/*" | ||
- "Gemfile*" | ||
- "Movefile" | ||
- "wp-config.php" | ||
- "wp-content/*.sql" | ||
|
||
ssh: | ||
host: "host" | ||
user: "user" | ||
port: 22 | ||
rsync_options: --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# encoding: utf-8 | ||
# vim: ft=ruby expandtab shiftwidth=2 tabstop=2 | ||
|
||
require 'yaml' | ||
|
||
Vagrant.require_version '>= 1.8.6' | ||
|
||
Vagrant.configure(2) do |config| | ||
|
||
vccw_version = '3.3.1'; | ||
|
||
_conf = YAML.load( | ||
File.open( | ||
File.join(File.dirname(__FILE__), 'provision/default.yml'), | ||
File::RDONLY | ||
).read | ||
) | ||
|
||
if File.exists?(File.join(ENV["HOME"], '.vccw/config.yml')) | ||
_custom = YAML.load( | ||
File.open( | ||
File.join(ENV["HOME"], '.vccw/config.yml'), | ||
File::RDONLY | ||
).read | ||
) | ||
_conf.merge!(_custom) if _custom.is_a?(Hash) | ||
end | ||
|
||
if File.exists?(File.join(File.dirname(__FILE__), 'site.yml')) | ||
_site = YAML.load( | ||
File.open( | ||
File.join(File.dirname(__FILE__), 'site.yml'), | ||
File::RDONLY | ||
).read | ||
) | ||
_conf.merge!(_site) if _site.is_a?(Hash) | ||
end | ||
|
||
# forcing config variables | ||
_conf["vagrant_dir"] = "/vagrant" | ||
|
||
config.vm.define _conf['hostname'] do |v| | ||
end | ||
|
||
config.vm.box = ENV['wp_box'] || _conf['wp_box'] | ||
config.vm.box_version = "<= 20161209" | ||
config.ssh.forward_agent = true | ||
|
||
config.vm.box_check_update = true | ||
|
||
config.vm.hostname = _conf['hostname'] | ||
config.vm.network :private_network, ip: _conf['ip'] | ||
|
||
config.vm.synced_folder _conf['synced_folder'], | ||
_conf['document_root'], :create => "true", :mount_options => ['dmode=755', 'fmode=644'] | ||
|
||
if Vagrant.has_plugin?('vagrant-hostsupdater') | ||
config.hostsupdater.remove_on_suspend = true | ||
end | ||
|
||
if Vagrant.has_plugin?('vagrant-vbguest') | ||
config.vbguest.auto_update = false | ||
end | ||
|
||
if File.exists?(File.join(File.dirname(__FILE__), 'provision-pre.sh')) then | ||
config.vm.provision :shell, :path => File.join( File.dirname(__FILE__), 'provision-pre.sh' ) | ||
end | ||
|
||
config.vm.provider :virtualbox do |vb| | ||
vb.linked_clone = _conf['linked_clone'] | ||
vb.name = _conf['hostname'] | ||
vb.memory = _conf['memory'].to_i | ||
vb.cpus = _conf['cpus'].to_i | ||
if 1 < _conf['cpus'].to_i | ||
vb.customize ['modifyvm', :id, '--ioapic', 'on'] | ||
end | ||
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on'] | ||
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on'] | ||
end | ||
|
||
config.vm.provision "ansible_local" do |ansible| | ||
ansible.extra_vars = { | ||
vccw: _conf | ||
} | ||
ansible.playbook = "provision/playbook.yml" | ||
end | ||
|
||
if File.exists?(File.join(ENV["HOME"], '.vccw/playbook-post.yml')) | ||
config.vm.provision "ansible" do |ansible| | ||
ansible.extra_vars = { | ||
vccw: _conf | ||
} | ||
ansible.playbook = File.join(ENV["HOME"], '.vccw/playbook-post.yml') | ||
end | ||
end | ||
|
||
if File.exists?(File.join(ENV["HOME"], '.vccw/provision-post.sh')) | ||
config.vm.provision :shell, :privileged => false, :path => File.join(ENV["HOME"], '.vccw/provision-post.sh') | ||
end | ||
|
||
if File.exists?(File.join(File.dirname(__FILE__), 'playbook-post.yml')) then | ||
config.vm.provision "ansible_local" do |ansible| | ||
ansible.extra_vars = { | ||
vccw: _conf | ||
} | ||
ansible.playbook = "playbook-post.yml" | ||
end | ||
end | ||
|
||
if File.exists?(File.join(File.dirname(__FILE__), 'provision-post.sh')) then | ||
config.vm.provision :shell, :privileged => false, :path => File.join( File.dirname(__FILE__), 'provision-post.sh' ) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[defaults] | ||
hash_behaviour=merge | ||
remote_tmp=/vagrant/.ansible/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
if [ -e /vagrant/wordpress.sql ]; then | ||
sudo -u vagrant -- wp db import /vagrant/wordpress.sql | ||
fi | ||
|
||
cat << EOS > /vagrant/wp-cli.yml | ||
path: wordpress | ||
EOS |
Oops, something went wrong.