summaryrefslogtreecommitdiff
path: root/vpn/deploy.sh
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-06-30 22:29:07 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-06-30 22:29:07 +0900
commit58f7917662ff92a3712289acccff8310c8f1baff (patch)
treecf7290a3eaf0e08c170199ac831f562949785014 /vpn/deploy.sh
parent1ad98cc2f9f8a5950aec998a6daacec381cbe2c4 (diff)
Add strongSwan IKEv2 VPN service
- vpn/: Dockerfile, docker-compose.yml, swanctl.conf.tpl, entrypoint.sh - install.sh: Caddy 証明書流用 + コンテナ起動 - renew-cert.sh: 証明書更新 + swanctl ホットリロード - caddy/Caddyfile: vpn.yyamashita.com 追加(Let's Encrypt 証明書取得用) - post-receive: vpn/deploy.sh を追加 - setup-route53.py: WEB_SUBDOMAINS に vpn を追加 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'vpn/deploy.sh')
-rw-r--r--vpn/deploy.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/vpn/deploy.sh b/vpn/deploy.sh
new file mode 100644
index 0000000..0005d9a
--- /dev/null
+++ b/vpn/deploy.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+set -euo pipefail
+cd "$(dirname "$0")"
+
+# 初期化前はスキップ(install.sh を先に実行する必要がある)
+if [ ! -f users.conf ] || [ ! -f certs/server.crt ]; then
+ echo "VPN: 未初期化のためスキップ (install.sh を実行してください)"
+ exit 0
+fi
+
+docker compose up -d --build