Coder Social home page Coder Social logo

Production deployment about belenios HOT 4 CLOSED

rmylb avatar rmylb commented on June 29, 2024
Production deployment

from belenios.

Comments (4)

glondu avatar glondu commented on June 29, 2024 2

this is the correct way to deploy a production server ?

Yes, you can build on that (there is not "one" way). But a Belenios instance should always be protected by HTTPS.

do you have any snippet for a systemd config file ? I've some trouble to deal with env variables and user path (default directory where Belenios is).

Yes, this is what I use at belenios.loria.fr:

[Unit]
Description=Belenios election server at belenios.loria.fr
After=network.target

[Service]
ExecStart=/srv/belenios.loria.fr/run-server.sh
ExecStop=/srv/belenios.loria.fr/stop-server.sh
TimeoutStopSec=15
User=www-belenios

[Install]
WantedBy=multi-user.target

where the run-server.sh script is a proxy script that sources env.sh, cd-s to Belenios sources, then exec-s demo/run-server.sh, and stop-server.sh is the following:

#!/bin/sh

echo shutdown 10 > $(dirname $0)/var/run/ocsigenserver_command

Can I restrict ocsigenserver on localhost only (127.0.0.1:8001) and use a reverse proxy safely (nginx) to deal with Let's Encrypt ?

Absolutely.

from belenios.

rmylb avatar rmylb commented on June 29, 2024

Thank you 🙏
It works like a charm !

from belenios.

rmylb avatar rmylb commented on June 29, 2024

For the stop command, I've an error.
I have try to put the path instead (/home/myuser/.belenios/opam/4.08.1/lib/ocsigenserver/var/run/ocsigenserver_command) but same error.

myuser@belenios:/srv/belenios$ sudo systemctl stop belenios
myuser@belenios:/srv/belenios$ sudo systemctl status belenios
● belenios.service - Belenios election server
   Loaded: loaded (/etc/systemd/system/belenios.service; disabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Mon 2020-11-09 14:20:46 CET; 10s ago
  Process: 9083 ExecStart=/srv/belenios/run-server.sh (code=killed, signal=TERM)
  Process: 9108 ExecStop=/srv/belenios/stop-server.sh (code=killed, signal=TERM)
 Main PID: 9083 (code=killed, signal=TERM)

nov. 09 14:20:11 belenios systemd[1]: Started Belenios election server.
nov. 09 14:20:30 belenios systemd[1]: Stopping Belenios election server...
nov. 09 14:20:46 belenios systemd[1]: belenios.service: Stopping timed out. Terminating.
nov. 09 14:20:46 belenios systemd[1]: belenios.service: Main process exited, code=killed, status=15/TERM
nov. 09 14:20:46 belenios systemd[1]: belenios.service: Control process exited, code=killed, status=15/TERM
nov. 09 14:20:46 belenios systemd[1]: belenios.service: Failed with result 'timeout'.
nov. 09 14:20:46 belenios systemd[1]: Stopped Belenios election server.

I'm not really confortable with OcsigenServer, any tips ?
Thank you!

from belenios.

glondu avatar glondu commented on June 29, 2024

Is the path to ocsigenserver_command the same in stop-server.sh and ocsigenserver.conf.in?

from belenios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.