diff options
author | EuAndreh <eu@euandre.org> | 2022-03-20 13:54:18 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-03-20 13:54:18 -0300 |
commit | e98f7deaf3f1ef70be1bdde354248c109e240868 (patch) | |
tree | abfb4357cb115f647b82abbf0160e11af55bc99a | |
parent | TODOs.md: Add #td-fa5c767a-c63d-69dd-1fb4-1425ed7b219e (diff) | |
download | server-e98f7deaf3f1ef70be1bdde354248c109e240868.tar.gz server-e98f7deaf3f1ef70be1bdde354248c109e240868.tar.xz |
Use `/opt` over `/srv`
-rwxr-xr-x | aux/ci/ci-build.sh | 7 | ||||
-rwxr-xr-x | aux/ci/git-post-receive.sh | 4 | ||||
-rwxr-xr-x | aux/ci/git-pre-push.sh | 4 | ||||
-rw-r--r-- | src/infrastructure/machines.scm | 5 |
4 files changed, 11 insertions, 9 deletions
diff --git a/aux/ci/ci-build.sh b/aux/ci/ci-build.sh index 8d18252..bfc0393 100755 --- a/aux/ci/ci-build.sh +++ b/aux/ci/ci-build.sh @@ -36,9 +36,12 @@ EOF cd - git fetch origin refs/notes/*:refs/notes/* sh aux/ci/report.sh -n "$PROJECT" -o public - rsync -av public/ "/srv/http/$PROJECT/" + rsync -av public/ "/opt/www/$TLD/static/$PROJECT/" - tar -C /srv/http -cf /srv/http/"$PROJECT"/repo.tar.gz \ + tar \ + -C /opt/www/$TLD/git/repos \ + -c \ + -f /opt/www/$TLD/static/"$PROJECT"/repo.tar.gz \ "$PROJECT".git printf '\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s\n>>>\n\n' \ diff --git a/aux/ci/git-post-receive.sh b/aux/ci/git-post-receive.sh index 92bba73..f813259 100755 --- a/aux/ci/git-post-receive.sh +++ b/aux/ci/git-post-receive.sh @@ -18,5 +18,5 @@ LOGS_DIR="/opt/ci/$PROJECT/logs" sh "/opt/ci/$PROJECT/ci-build.sh" "$PROJECT" "$LOGS_DIR" "$SHA" ||: echo 'To retrigger the build, run:' -echo "cd /srv/http/$PROJECT.git/" -echo "sh /opt/ci/$PROJECT/ci-build.sh" "$PROJECT" "$LOGS_DIR" "$SHA" +echo "cd /opt/www/$TLD/git/repos/$PROJECT.git/" +echo "sh /opt/www/$TLD/git/ci/$PROJECT/ci-build.sh" "$PROJECT" "$LOGS_DIR" "$SHA" diff --git a/aux/ci/git-pre-push.sh b/aux/ci/git-pre-push.sh index eaaa7bd..9883769 100755 --- a/aux/ci/git-pre-push.sh +++ b/aux/ci/git-pre-push.sh @@ -5,8 +5,8 @@ TLD="$(cat aux/tld.txt)" . aux/lib.sh PROJECT="$(basename "$PWD")" -LOGS_DIR="/opt/ci/$PROJECT/logs" -REMOTE_GIT_DIR="/srv/http/$PROJECT.git" +LOGS_DIR="/opt/www/$TLD/git/ci/$PROJECT/logs" +REMOTE_GIT_DIR="/opt/www/$TLD/git/repos/$PROJECT.git" DESCRIPTION="$(mkstemp)" if [ -f description ] diff --git a/src/infrastructure/machines.scm b/src/infrastructure/machines.scm index 6c239d6..9ebdd82 100644 --- a/src/infrastructure/machines.scm +++ b/src/infrastructure/machines.scm @@ -166,8 +166,7 @@ /etc/letsencrypt/ \ /var/lib/certbot/ \ /var/lib/letsencrypt \ - /opt/secrets/ \ - /srv/ + /opt/ borg check \ --verbose \ @@ -331,7 +330,7 @@ (nginx-server-configuration (server-name '("arrobaponto.org")) (listen '("[::]:443 ssl http2" "443 ssl http2")) - (root "/srv/http/arrobaponto.org") + (root "/opt/www/arrobaponto.org/static/") (ssl-certificate "/etc/letsencrypt/live/arrobaponto.org/fullchain.pem") (ssl-certificate-key "/etc/letsencrypt/live/arrobaponto.org/privkey.pem") (raw-content '(#"""- |