Ariane is a training session / teaching platform.
  • Python 50%
  • HTML 50%
Find a file
2025-12-17 09:09:01 +01:00
.idea Updated gitignore, and added some IDE files. 2025-12-14 18:00:28 +01:00
data Initial commit 2025-12-14 14:13:17 +01:00
templates reworked UI, added colored tags 2025-12-14 19:14:51 +01:00
.gitignore added gitignore 2025-12-14 14:12:17 +01:00
app.py Revert "Potential fix for code scanning alert no. 7: Uncontrolled data used in path expression" 2025-12-17 09:09:01 +01:00
example.env Initial commit 2025-12-14 14:13:17 +01:00
LICENSE Initial commit 2025-12-14 14:06:35 +01:00
README.md Revert "Update README.md" 2025-12-17 09:04:53 +01:00
TODO.md Initial commit 2025-12-14 14:13:17 +01:00

Ariane Cours

This is a lightweight platform to host training sessions instructions and files for students.

All files are stored in the upload/ folder.

There is no database, as there should not be many sessions at the same time. They are stored as JSON in sessions.json.

A security.log log file is provided: it may be consumed by fail2ban to ban offending users (better and longer than the banning already present in the code).

Also, the "validate" section in the admin page is created to use a script to automate a bash script (used in my case to create Proxmox users for exercises), and is not (yet) fully tested.

License

Apache 2.0, see LICENSE.

Run locally in debug mode (dev, tests)

All these commands have been tested on Debian 13. It should work anywhere else, as long as you provide the right python packes for the distro you are using.

apt install python3-flask python3-flaskext.wtf
flask --app app run

Run in production mode

All these commands have been tested on Debian 13. It should work anywhere else, as long as you provide the right python packes for the distro you are using.

Copy example.env to .env, and fill it in. ADMIN_PASSWORD_HASH is recommended over ADMIN_PASSWORD. SECRET_KEY must be filled as indicated.

Create a systemd unit in /etc/systemd/system/ariane.service. Change User, Group, WorkingDirectory to fit your system.

[Unit]
Description=Gunicorn starting Ariane project
After=network.target

[Service]
Type=notify
NotifyAccess=main
User=user
Group=user
RuntimeDirectory=gunicorn
WorkingDirectory=/home/user/Ariane-Cours
ExecStart=/usr/bin/gunicorn -w 1 -b 127.0.0.1 "app:app"
ExecReload=/bin/kill -s HUP $MAINPID
KillMode=mixed
TimeoutStopSec=5
PrivateTmp=true

[Install]
WantedBy=multi-user.target
apt install python3-gunicorn gunicorn python3-flask python3-flaskext.wtf
systemctl daemon-reload
systemctl enable --now ariane.service

You should be able to see it working with curl.

curl http://127.0.0.1:8000

Put a Apache2, HAProxy or Nginx in reverse proxy in front of it, with certbot for a valid TLS certificate, and you should be good.