AVAILABLE ONLINE TILL DECEMBER 30, 2024 at http://34.2.131.144:5173/
We are a group of students at UET - VNU.
| # | Student ID | Name |
|---|---|---|
| 1 | 22028235 | Vũ Tùng Lâm |
| 2 | 22028182 | Nguyễn Văn Thiện |
| 3 | 22028189 | Lê Thành Đạt |
| 4 | 22028332 | Nguyễn Phương Anh |
| 5 | 22025517 | Nguyễn Minh Châu |
| 6 | 22028092 | Ngô Tùng Lâm |
| 7 | 22028053 | Tạ Việt Anh |
| 8 | 22021149 | Vi Văn Quân |
That is, you install the app as well as the required tools straight into your own system.
-
Only run on Linux!
-
Python 3.12+
-
MySQL Client Libraries for Python.
On Debian/Ubuntu-based distros, run the following:
sudo apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config
For other distros, see the full guide at https://pypi.org/project/mysqlclient/.
-
The current user (i.e. the user that installs and runs this app) must be in the sudoers file, so that this app could execute some critical commands (e.g. iptables routing) without prompting a password.
echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
You may want to create and activate a virtual environment (venv) first. Then, at the project root, run
pip install -r requirements.txtYou have to create a .env file at the project root
containing the values of the required environment
variables. See the example.env file to know what
those variables are.
Some variables require setting up a database and a Redis server.
After specifying the variables properly, you now have to migrate the database. Run (after the venv is activated):
flask db upgradeInstall pm2. Then, at the project root, run:
pm2 start ecosystem.config.jsIt should be available at http://localhost:5002.
Whenever some models change, create a new migration and apply it for the changes to actually take effect/be reflected in the database.
To do that, activate the venv if necessary, then execute
flask db migrate -m "Migration content, e.g. rename column C of table T"
flask db upgradeCopyright (C) 2024-now Vũ Tùng Lâm et.al.
Licensed under the 3-clause BSD license. See LICENSE.txt for details.