summaryrefslogtreecommitdiffhomepage
path: root/provisioning/run.sh
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-01-17 23:38:54 +0900
committernsfisis <nsfisis@gmail.com>2024-01-17 23:41:40 +0900
commitbb8d510516888fe1cda506c1a5816cee339eace3 (patch)
treeeaa9ee8824f3b77cf4e43802aacbee0129e8a05e /provisioning/run.sh
parent9c448ed58559e54c152b7809a4bd1a6df56dcd95 (diff)
downloadnil.ninja-bb8d510516888fe1cda506c1a5816cee339eace3.tar.gz
nil.ninja-bb8d510516888fe1cda506c1a5816cee339eace3.tar.zst
nil.ninja-bb8d510516888fe1cda506c1a5816cee339eace3.zip
add files
Diffstat (limited to 'provisioning/run.sh')
-rwxr-xr-xprovisioning/run.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/provisioning/run.sh b/provisioning/run.sh
new file mode 100755
index 0000000..5f8ade4
--- /dev/null
+++ b/provisioning/run.sh
@@ -0,0 +1,30 @@
+set -eu
+
+this_dir="$(cd "$(dirname "$0")"; pwd)"
+export BIN_ROOT="${this_dir}/.bin"
+export REPO_ROOT="$(cd "${this_dir}/.."; pwd)"
+
+export MITAMAE_VERSION=v1.14.0
+export MITAMAE_ARCH=x86_64-linux
+export LEGO_VERSION=v4.14.2
+export LEGO_ARCH=amd64
+export LEGO_CONF_EMAIL=nsfisis@gmail.com
+export LEGO_CONF_WEBROOT="${REPO_ROOT}/letsencrypt/webroot"
+export LEGO_CONF_PATH="${REPO_ROOT}/letsencrypt/lego"
+export LEGO_CONF_DOMAINS="\
+nil.ninja,\
+t.nil.ninja"
+export GOLANG_VERSION=1.21.1
+export MIOPROXY_VERSION=v0.2.1
+
+mitamae_bin_url="https://github.com/itamae-kitchen/mitamae/releases/download/${MITAMAE_VERSION}/mitamae-${MITAMAE_ARCH}.tar.gz"
+
+rm -rf "${BIN_ROOT}"
+mkdir "${BIN_ROOT}"
+
+curl -L -o "${BIN_ROOT}/mitamae.tar.gz" "${mitamae_bin_url}"
+tar xf "${BIN_ROOT}/mitamae.tar.gz" -C "${BIN_ROOT}"
+mv "${BIN_ROOT}/mitamae-${MITAMAE_ARCH}" "${BIN_ROOT}/mitamae"
+rm -f '${BIN_ROOT}/mitamae.tar.gz'
+
+"${BIN_ROOT}/mitamae" local "${this_dir}/recipe.rb"