User Tools

Site Tools


evenements:log:20200606

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
evenements:log:20200606 [2020-06-06 10:46] – [Online Fuzturday #1] Lomanicevenements:log:20200606 [2020-06-06 21:02] – [Proposed plan] +log WIP Lomanic
Line 1: Line 1:
 ====== Online Fuzturday #1 ====== ====== Online Fuzturday #1 ======
  
-First proposal of a Telemake event, the theme for this one is to migrate https://presence-button.glitch.me to sonic (at https://presence.fuz.re). Event will  take place 2020-06-06 15:00 (approx) Paris time, on Jitsi meet https://talk.fdn.fr/onlinefuzturday1+First proposal of a [[https://matrix.to/#/#telemake:matrix.fuz.re|Telemake]] event, the theme for this one is to migrate https://presence-button.glitch.me to sonic (at https://presence.fuz.re). Event will  take place 2020-06-06 15:00 (approx) Paris time, on Jitsi meet https://talk.fdn.fr/onlinefuzturday1
 ===== Proposed plan ===== ===== Proposed plan =====
  
Line 17: Line 17:
   * Ansible?   * Ansible?
   * get rid of clunky lighttpd (caddy is awesome)   * get rid of clunky lighttpd (caddy is awesome)
 +
 +===== Log =====
 +Nobody showed up on Jitsi, I (Lomanic) stopped all my shiny OBS setup and did this alone.
 +
 +  * ''sudo adduser presence''
 +  * ''<nowiki>sudo -u presence -i; curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash; nvm install node --lts</nowiki>''
 +  * ''<nowiki>git clone https://git.interhacker.space/Lomanic/presence-button-web</nowiki>'', add .env file and append ''echo "PORT=3000" >> .env'', otherwise the listening port would be dynamic (useless for reverse proxy)
 +  * following https://doc.ubuntu-fr.org/creer_un_service_avec_systemd#exemple_de_service_de_type_simple <code>
 +cat << EOF > /etc/systemd/system/presence-button-web.service
 +[Unit]  
 +Description=Presence button web
 +After=network-online.target
 +
 +[Service]
 +Type=simple
 + 
 +User=presence
 +Group=presence
 +WorkingDirectory=/home/presence/presence-button-web
 +ExecStart=bash -c "source /home/presence/.nvm/nvm.sh && set -a && source .env && set +a && /home/presence/.nvm/versions/node/v14.4.0/bin/npm start"
 +Restart=on-failure
 +TimeoutStopSec=300
 +
 +[Install]
 +WantedBy=multi-user.target
 +EOF
 +systemctl enable presence-button-web.service
 +</code>
 +  * add this to ''/etc/lighttpd/lighttpd.conf''<code>
 +$HTTP["host"] == "presence.fuz.re" {
 +    $HTTP["scheme"] == "http" {
 +        server.document-root = "/var/www/fuz.re/presence/site"
 +                $HTTP["url"] !~ "^/.well-known/acme-challenge/" {
 +                        proxy.server = ( "" => (("host" => "127.0.0.1", "port" => 3000)) )
 +                }
 +        }
 +
 +        #$SERVER["socket"] == ":443" {
 +        #       ssl.engine  = "enable"
 +        #       proxy.server = ( "" => (("host" => "127.0.0.1", "port" => 3000)) )
 +        #       ssl.ca-file = "/etc/lighttpd/certs/authority.pem"
 +        #       ssl.pemfile = "/etc/lighttpd/certs/presence.fuz.re.pem"
 +        #}
 +}
 +</code>''mkdir -p /var/www/fuz.re/presence/site''
 +  * letsencrypt
 +  * add ssl to vhost
 +  * test
 +
 +If we have time:
 +  * continuous delivery
 +  * Ansible?
 +  * get rid of clunky lighttpd (caddy is awesome)
 +
  
evenements/log/20200606.txt · Last modified: 2023-02-02 22:06 by 127.0.0.1