Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/besser435/teaw-website
https://github.com/besser435/teaw-website
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/besser435/teaw-website
- Owner: besser435
- Created: 2024-11-28T03:59:00.000Z (about 1 month ago)
- Default Branch: dev
- Last Pushed: 2024-12-05T08:02:55.000Z (about 1 month ago)
- Last Synced: 2024-12-05T08:33:23.970Z (about 1 month ago)
- Language: Python
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TEAW-Website
## Git guidelines
There are two branches, `prod` and `dev`. The default is `dev`, and where any changes should be made.In the future, changes will be deployed by bringing changes over from dev (or some other branch) to prod using a pull request.
Only once approved, will the PR be merged, and the new changes deployed using a GH webhook.Before submitting a PR, run the VS Code task to generate the requirements.txt file for pip.
## Starting a development server
To start a local version of the website for testing/development, run the
`teaw_webserver.py` file, or in VS Code, go to Terminal > Run Task > Start Development Server.
This will start Flask in debug mode, with the logger set to the DEBUG level. This will also enable
Flask's debug mode. For any changes to show up on the website, the process must be restarted.> [!NOTE]
> In order for the server and API to work, the SQLite DBs will need to contain information. By default, there is some
data in them. The data will not be updated unless the `db_updater.py` and `stats_updater.py` processes are started,
but thats not needed for development.TODO: add the example data.
## Starting a production server
To deploy the server, run the `run_prod.sh` script with Bash. This will take the Flask `app` variable inside the
`teaw_webserver` script, and start it with Gunicorn. Note that this disables any debugging features, and can only be ran on Linux.The `db_updater.py` and `stats_updater.py` processes need to be started, so the databases are updated. It is best to use
[tmux](https://github.com/tmux/tmux?tab=readme-ov-file#welcome-to-tmux) to open and keep running the DB updaters and the webserver.
In the future there will be a Bash script to automatically destroy an existing tmux session, and create new ones which contain the
required processes.(yes I know tmux is not a proper process management tool, but it works well)