Add auto-deploy for blog.jaseg.de
This commit is contained in:
parent
f698d78c4c
commit
514af66cc3
4 changed files with 41 additions and 2 deletions
8
gitolite-site-deploy-hook.sh
Normal file
8
gitolite-site-deploy-hook.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
echo "[deploy] Checking out static files to blog.jaseg.de webdir..."
|
||||||
|
echo -n "Checkout is initialized: "
|
||||||
|
env GIT_WORK_TREE=/var/www/blog.jaseg.de git rev-parse --is-inside-work-tree || git worktree add --detach /var/www/blog.jaseg.de deploy
|
||||||
|
umask 0002
|
||||||
|
env GIT_WORK_TREE=/var/www/blog.jaseg.de git checkout -f deploy
|
||||||
|
git symbolic-ref HEAD refs/head/main
|
||||||
|
echo "[deploy] done."
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
# suggested locations for site-local gitolite code (see cust.html)
|
# suggested locations for site-local gitolite code (see cust.html)
|
||||||
|
|
||||||
# this one is managed directly on the server
|
# this one is managed directly on the server
|
||||||
# LOCAL_CODE => "$ENV{HOME}/local",
|
LOCAL_CODE => "$ENV{HOME}/local",
|
||||||
|
|
||||||
# or you can use this, which lets you put everything in a subdirectory
|
# or you can use this, which lets you put everything in a subdirectory
|
||||||
# called "local" in your gitolite-admin repo. For a SECURITY WARNING
|
# called "local" in your gitolite-admin repo. For a SECURITY WARNING
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
# 'cgit',
|
# 'cgit',
|
||||||
|
|
||||||
# allow repo-specific hooks to be added
|
# allow repo-specific hooks to be added
|
||||||
# 'repo-specific-hooks',
|
'repo-specific-hooks',
|
||||||
|
|
||||||
# performance, logging, monitoring...
|
# performance, logging, monitoring...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,30 @@
|
||||||
group: gitolite3
|
group: gitolite3
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
|
||||||
|
- name: Create gitolite hook dir
|
||||||
|
file:
|
||||||
|
path: /var/lib/gitolite3/local/hooks/repo-specific
|
||||||
|
state: directory
|
||||||
|
owner: gitolite3
|
||||||
|
group: gitolite3
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Copy blog.jaseg.de git deployment script
|
||||||
|
copy:
|
||||||
|
src: gitolite-site-deploy-hook.sh
|
||||||
|
dest: /var/lib/gitolite3/local/hooks/repo-specific
|
||||||
|
owner: gitolite3
|
||||||
|
group: gitolite3
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Create blog content dir
|
||||||
|
file:
|
||||||
|
path: /var/www/blog.jaseg.de
|
||||||
|
state: directory
|
||||||
|
owner: nginx
|
||||||
|
group: gitolite3
|
||||||
|
mode: 0570
|
||||||
|
|
||||||
- name: Query system user account info
|
- name: Query system user account info
|
||||||
getent:
|
getent:
|
||||||
database: passwd
|
database: passwd
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,13 @@
|
||||||
- openjscad.jaseg.net
|
- openjscad.jaseg.net
|
||||||
- automation.jaseg.de
|
- automation.jaseg.de
|
||||||
|
|
||||||
|
- name: Create blog content dir
|
||||||
|
file:
|
||||||
|
path: /var/www/blog.jaseg.de
|
||||||
|
state: directory
|
||||||
|
owner: nginx
|
||||||
|
mode: 0550
|
||||||
|
|
||||||
- name: Copy uwsgi systemd socket config
|
- name: Copy uwsgi systemd socket config
|
||||||
copy:
|
copy:
|
||||||
src: uwsgi-app@.socket
|
src: uwsgi-app@.socket
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue