server.org (2176B)
1#+STARTUP: content 2#+STARTUP: indent 3* Server 4:PROPERTIES: 5:CUSTOM_ID: server 6:END: 7** HTTP (nginx) 8:PROPERTIES: 9:CUSTOM_ID: server_http 10:END: 11#+BEGIN_SRC sh 12 # install docker 13 xi docker docker-compose 14#+END_SRC 15** Git 16:PROPERTIES: 17 :CUSTOM_ID: server_git 18 :END: 19*** [[https://git-scm.com/book/en/v2/Git-on-the-Server-Git-Daemon][Git Daemon]] 20:PROPERTIES: 21 :CUSTOM_ID: server_git_daemon 22 :END: 23#+BEGIN_SRC sh 24 #!/bin/sh 25 # /etc/sv/git-daemon/run 26 exec chpst -u username:username git daemon \ 27 --reuseaddr \ 28 --base-path=/home/username/git/repo \ 29 /home/username/git/repo 30#+END_SRC 31*** [[https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server][Bare Repository]] 32:PROPERTIES: 33 :CUSTOM_ID: server_git_bare-repo 34 :END: 35#+BEGIN_SRC sh 36 cd $HOME/git/repo 37 mkdir reponame.git && cd $_ 38 git init --bare --shared=group 39 touch git-daemon-export-ok 40 vim decription owner url 41 # change denyNonFastforwards to false 42 vim config 43#+END_SRC 44*** Static Git Page 45:PROPERTIES: 46:CUSTOM_ID: server_git_static-git-page 47:END: 48Install ~stagit~ and add ~repo/.git/hooks/post-receive~ 49** WebDAV (rclone) 50:PROPERTIES: 51:CUSTOM_ID: server_webdav 52:END: 53#+BEGIN_SRC sh 54 #!/bin/sh 55 # /etc/sv/rclone-webdav/run 56 exec rclone serve webdav \ 57 --addr domain.tld:1234 \ 58 --user username \ 59 --pass password \ 60 --cert /etc/letsencrypt/live/domain.tld/fullchain.pem \ 61 --key /etc/letsencrypt/live/domain.tld/privkey.pem \ 62 /home/username/webdav 2>&1 63 #+END_SRC 64** Pastebin (fiche) 65:PROPERTIES: 66 :CUSTOM_ID: server_pastebin 67 :END: 68*/etc/sv/fiche/run* 69#+BEGIN_SRC sh 70 #!/bin/sh 71 exec chpst -u _fiche:_fiche fiche \ 72 -S -d domain.tld/pastebin \ 73 -o /var/tmp/fiche \ 74 -l /var/log/fiche/log 75#+END_SRC 76** IRC Network Bouncer (znc) 77:PROPERTIES: 78:CUSTOM_ID: server_irc 79:END: 80~znc~ 81** Music Radio (vlc) 82:PROPERTIES: 83:CUSTOM_ID: server_music-radio 84:END: 85*/etc/sv/vlc-stream/run* 86#+BEGIN_SRC sh 87 #!/bin/sh 88 exec chpst -u username:username cvlc \ 89 /home/username/music \ 90 ':sout=#http{mux=ogg,dst=:12345/}' ':no-sout-all' ':sout-keep' \ 91 --intf \ 92 http 1>/dev/null 93#+END_SRC