From ddb28ddf50614db030b6873358ff157110a2d67e Mon Sep 17 00:00:00 2001 From: William Mantly Date: Sun, 20 Aug 2023 13:21:08 -0400 Subject: [PATCH 1/3] added folder to gain access to conf of vagrant container --- .gitignore | 3 ++- openresty/README.md | 0 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 openresty/README.md diff --git a/.gitignore b/.gitignore index 0a928b0..ca14973 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/openresty/README.md b/openresty/README.md new file mode 100644 index 0000000..e69de29 From 8c44ab91f9bfa90c37bc471b9b643fdbdb33ddb4 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Sun, 20 Aug 2023 14:09:46 -0400 Subject: [PATCH 2/3] fixes for allowing editing of conf outside of VM --- .gitignore | 4 ++-- Vagrantfile | 9 ++++++--- openresty/README.md | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ca14973..31bc1f5 100755 --- a/.gitignore +++ b/.gitignore @@ -86,5 +86,5 @@ ops/cookbooks/vendor secrets.json secrets.js -.openresty/** -!.openresty/README.md +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 index e69de29..2d9de21 100644 --- a/openresty/README.md +++ b/openresty/README.md @@ -0,0 +1 @@ +`#include sites-enabled/*;` \ No newline at end of file From 6836809fee9f3e8eb26e5ad28af35f055cd3c668 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Sun, 20 Aug 2023 14:19:30 -0400 Subject: [PATCH 3/3] Added readme for new feature --- openresty/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openresty/README.md b/openresty/README.md index 2d9de21..a052576 100644 --- a/openresty/README.md +++ b/openresty/README.md @@ -1 +1,9 @@ -`#include sites-enabled/*;` \ No newline at end of file +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"`