From 17a47c86a9545d8572b247a15962de7a0a6e9c05 Mon Sep 17 00:00:00 2001 From: Alex Hyett Date: Wed, 16 Dec 2015 21:29:43 +0000 Subject: [PATCH] Auto copy of themes on build --- .gitignore | 11 +---------- Dockerfile | 4 ++++ Vagrantfile | 2 +- docker-compose.yml => compose-dev.yml | 2 +- compose-prod.yml | 14 ++++++++++++++ src/.gitignore | 9 +++++++++ 6 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 Dockerfile rename docker-compose.yml => compose-dev.yml (93%) create mode 100644 compose-prod.yml create mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index bfc7db0..e488acb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,2 @@ .vagrant -.DS_Store -src/index.php -src/plugins/hello.php -src/plugins/index.php -src/plugins/akismet - -src/themes/index.php -src/themes/twentyfourteen -src/themes/twentyfifteen -src/themes/twentysixteen \ No newline at end of file +.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dd55cde --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +# Wordpress image which loads content folder +FROM wordpress + +ADD src /var/www/html/wp-content/ \ No newline at end of file diff --git a/Vagrantfile b/Vagrantfile index 6c2a16e..cd42bb7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -14,7 +14,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.hostsupdater.remove_on_suspend = true config.vm.provision :docker - config.vm.provision :docker_compose, yml: "/vagrant/docker-compose.yml", run: "always" + config.vm.provision :docker_compose, yml: "/vagrant/compose-prod.yml", run: "always" # Fix for slow external network connections config.vm.provider :virtualbox do |vb| diff --git a/docker-compose.yml b/compose-dev.yml similarity index 93% rename from docker-compose.yml rename to compose-dev.yml index cbe2c94..9c0cb9a 100644 --- a/docker-compose.yml +++ b/compose-dev.yml @@ -1,5 +1,5 @@ web: - image: wordpress + build: . links: - mysql environment: diff --git a/compose-prod.yml b/compose-prod.yml new file mode 100644 index 0000000..ac2066f --- /dev/null +++ b/compose-prod.yml @@ -0,0 +1,14 @@ +web: + build: . + links: + - mysql + environment: + - WORDPRESS_DB_PASSWORD=password + ports: + - 80:80 + +mysql: + image: mysql:5.7 + environment: + - MYSQL_ROOT_PASSWORD=password + - MYSQL_DATABASE=wordpress \ No newline at end of file diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..0cf43aa --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,9 @@ +index.php +plugins/hello.php +plugins/index.php +plugins/akismet + +themes/index.php +themes/twentyfourteen +themes/twentyfifteen +themes/twentysixteen \ No newline at end of file