Skip to content

Commit b2e9cc2

Browse files
committed
sketch out deployment scripts
1 parent 21eaab7 commit b2e9cc2

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

scripts/Caddyfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
log {
3+
output stdout
4+
}
5+
}
6+
7+
https://cro.raku.org:443 {
8+
reverse_proxy v1-20240911-11:8080
9+
}
10+
11+
http://cro.raku.org:80 {
12+
reverse_proxy v1-20240911-11:8080
13+
}
14+
15+
http://*.baggy.int.raku.org:80 {
16+
@virtual_host header_regexp Host ([a-z0-9\-]+)\.baggy\.int\.raku\.org
17+
18+
handle @virtual_host {
19+
reverse_proxy {re.1}:8080
20+
}
21+
}
22+

scripts/deploy.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
4+
old_tag=
5+
tag=
6+
7+
ln -s \
8+
"/etc/containers/systemd/[email protected]" \
9+
"/etc/containers/systemd/cro-services-website@${tag}.container"
10+
11+
systemctl daemon-reload
12+
13+
systemctl list-unit-files --no-pager | awk '/cro-/'
14+
15+
systemctl start "cro-services-website@${tag}.service"
16+
systemctl stop "cro-services-website@${old_tag}"
17+
18+
rm -f "/etc/containers/systemd/cro-services-website\@${old_tag}.container"
19+
20+
systemctl daemon-reload

0 commit comments

Comments
 (0)