diff --git a/.gitignore b/.gitignore index 0a928b0..31bc1f5 100755 --- a/.gitignore +++ b/.gitignore @@ -86,4 +86,5 @@ ops/cookbooks/vendor secrets.json secrets.js -openresty/ \ No newline at end of file +openresty/** +!openresty/README.md diff --git a/Vagrantfile b/Vagrantfile index b532461..0830cd8 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -132,8 +132,11 @@ Vagrant.configure("2") do |config| end config.vm.provision "shell", inline: <<~SHELL - # cp -a /etc/openresty/. /vagrant/openresty - # rm -rf /etc/openresty - # ln -s /vagrant/openresty /etc/openresty + cd /vagrant/openresty + shopt -s extglob + rm -frv !("README.md") + cp -a "/usr/local/openresty/nginx/conf/." /vagrant/openresty + rm -rf /usr/local/openresty/nginx/conf/ + ln -s /vagrant/openresty/ /usr/local/openresty/nginx/conf SHELL end diff --git a/openresty/README.md b/openresty/README.md new file mode 100644 index 0000000..a052576 --- /dev/null +++ b/openresty/README.md @@ -0,0 +1,9 @@ +The folder will hold a link to the openresty conf file. Nothing in here will be +tracked, and edits are only valid on you local VM. The contents of this folder +is also reset during each provision run. Be mind full of that when making +changes here. + +To apply any changes made in this folder, run the following command from outside +the VM: + +`vagrant ssh -c "sudo service openresty restart"`