10 aug 2016
managing a ‘call for papers’ can be a lot of work. the tuebix cfp-software was created in the best practice of KISS.
we held a linuxtag at the university of tübingen called
tuebix and
we had a talk about nixos
and a workshop about
nixops
.
the cfp
-software backend is written in
golang
. the frontend was done in materializecss.
the workflow:
json
document and
send it via email to a mailinglistafter the cfp
is over, one can use jq to process the data for
creating a schedule.
security wise it would be good to create a custom user for hosting which was not done here.
#!/bin/sh
source /etc/profile
cd /home/joachim/cfp
nix-shell --command "while true; do go run server.go ; done"
systemd.services.cfp = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
#Type = "forking";
User = "joachim";
ExecStart = ''/home/joachim/cfp.sh'';
ExecStop = ''
'';
};
};
...
# nixcloud.io (https)
{
hostName = "nixcloud.io";
serverAliases = [ "nixcloud.io" "www.nixcloud.io" ];
documentRoot = "/www/nixcloud.io/";
enableSSL = true;
sslServerCert = "/ssl/nixcloud.io-2015.crt";
sslServerKey = "/ssl/nixcloud.io-2015.key";
sslServerChain = "/ssl/nixcloud.io-2015-intermediata.der";
extraConfig = ''
...
RewriteRule ^/cfp$ /cfp/ [R]
ProxyPass /cfp/ http://127.0.0.1:3000/ retry=0
ProxyPassReverse /cfp/ http://127.0.0.1:3000/
...
'';
...
using nix-shell
it was easy to develop the software and
to deploy it to the server. all dependencies are contained.
for further questions drop me an email: js@lastlog.de