You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* describe how to use railway instead of heroku
* use voila palette for documentation
* indentation issue in docs
---------
Co-authored-by: martinRenou <[email protected]>
Heroku.com is an attractive option if you want to try out deployment for
102
-
free. You have limited computing hours, however the app will also
103
-
automatically shutdown if it is idle.
103
+
Heroku.com was the suggested option for free deployment but since `November 28th 2022 <https://help.heroku.com/RSBRUH58/removal-of-heroku-free-product-plans-faq>`__, free
104
+
product plans have been removed from the platform. The process described in
105
+
this section remain valid for other services.
104
106
105
-
The general steps for deployment at Heroku can be found
7. Follow the instructions in `Setup an example project`_, and install the dependencies:
275
281
276
-
.. code:: text
277
-
278
-
sudo python3 -m pip install -r requirements.txt
279
-
280
-
8. Create a new systemd service for running Voilà in ``/usr/lib/systemd/system/voila.service``.
281
-
The service will ensure Voilà is automatically restarted on startup:
282
+
.. code:: text
282
283
283
-
.. code:: text
284
+
sudo python3 -m pip install -r requirements.txt
284
285
285
-
[Unit]
286
-
Description=Voila
286
+
8. Create a new systemd service for running Voilà in ``/usr/lib/systemd/system/voila.service``. The service will ensure Voilà is automatically restarted on startup:
In this example Voilà is started with ``voila --no-browser voila/notebooks/basics.ipynb`` to serve a single notebook.
301
306
You can edit the command to change this behavior and the notebooks Voilà is serving.
302
307
303
308
9. Enable and start the ``voila`` service:
304
309
305
-
.. code:: text
310
+
.. code:: text
306
311
307
-
sudo systemctl enable voila.service
308
-
sudo systemctl start voila.service
312
+
sudo systemctl enable voila.service
313
+
sudo systemctl start voila.service
309
314
310
315
.. note::
316
+
311
317
To check the logs for Voilà:
312
318
313
319
.. code:: text
@@ -322,45 +328,45 @@ Enable HTTPS with Let's Encrypt
322
328
323
329
1. Install ``certbot``:
324
330
325
-
.. code:: text
331
+
.. code:: text
326
332
327
-
sudo add-apt-repository ppa:certbot/certbot
328
-
sudo apt update
329
-
sudo apt install python-certbot-nginx
333
+
sudo add-apt-repository ppa:certbot/certbot
334
+
sudo apt update
335
+
sudo apt install python-certbot-nginx
330
336
331
337
2. Obtain the certificates from Let's Encrypt. The ``--nginx`` flag will edit the nginx configuration automatically:
332
338
333
-
.. code:: text
334
-
335
-
sudo certbot --nginx -d yourdomain.com
339
+
.. code:: text
340
+
341
+
sudo certbot --nginx -d yourdomain.com
336
342
337
343
3. ``/etc/nginx/sites-enabled/yourdomain.com`` should now contain a few more entries:
338
344
339
-
.. code :: text
340
-
341
-
$ cat /etc/nginx/sites-enabled/yourdomain.com
345
+
.. code :: text
342
346
343
-
...
344
-
listen 443 ssl; # managed by Certbot
345
-
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; # managed by Certbot
346
-
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem; # managed by Certbot
347
-
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
348
-
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
349
-
...
347
+
$ cat /etc/nginx/sites-enabled/yourdomain.com
348
+
349
+
...
350
+
listen 443 ssl; # managed by Certbot
351
+
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; # managed by Certbot
352
+
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem; # managed by Certbot
353
+
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
354
+
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
355
+
...
350
356
351
357
4. Visit ``yourdomain.com`` to access the Voilà applications over HTTPS.
352
358
353
359
5. To automatically renew the certificates (they expire after 90 days), open the ``crontab`` file:
354
360
355
-
.. code :: text
361
+
.. code :: text
356
362
357
-
crontab -e
363
+
crontab -e
358
364
359
-
And add the following line:
365
+
And add the following line:
360
366
361
-
.. code :: text
367
+
.. code :: text
362
368
363
-
0 12 * * * /usr/bin/certbot renew --quiet
369
+
0 12 * * * /usr/bin/certbot renew --quiet
364
370
365
371
For more information, you can also follow `the guide on the nginx blog <https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/>`__.
0 commit comments