https://github.com/sentexi/dcs-app
The DCS App is a web app for competitive debating created for the Debating Society Stuttgart
https://github.com/sentexi/dcs-app
debating
Last synced: 13 days ago
JSON representation
The DCS App is a web app for competitive debating created for the Debating Society Stuttgart
- Host: GitHub
- URL: https://github.com/sentexi/dcs-app
- Owner: Sentexi
- Created: 2025-05-24T17:41:38.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2026-01-18T18:10:01.000Z (5 months ago)
- Last Synced: 2026-01-19T02:20:08.829Z (5 months ago)
- Topics: debating
- Language: Python
- Homepage:
- Size: 358 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Setup Instructions
1. Create a virtual environment:
- `python -m venv venv`
2. Activate it:
- `venv\Scripts\activate` (Windows)
`source venv/bin/activate` (macOS/Linux)
3. Install dependencies:
- `pip install -r requirements.txt`
4. Set up the database if there were no modifications:
- `flask db upgrade`
5. If the database has been modified (either locally or in a branch from GitHub that is not consistent with the local state of the database), if not this step can be ignored:
- `flask db stamp head`
- `flask db migrate -m "some descriptive message here"`
- `flask db upgrade`
6. Run the app:
- `python run.py`
## Configuration
These settings can be provided via environment variables or by modifying
`config.py`:
- **SECRET_KEY** - Flask secret key. Default: `dev`.
- **SQLALCHEMY_DATABASE_URI** - database connection string.
Default: `sqlite:///debate_app.db`.
- **SQLALCHEMY_TRACK_MODIFICATIONS** - set to `true` to enable change
tracking. Default: `False`.
- **CORS_ALLOWED_ORIGINS** - origins allowed for CORS and SocketIO.
Provide a comma-separated list (e.g. `https://example.com`). Default: `*`.
- **PORT** - port used when running `python run.py`. Default: `5000`.
- **SERVER_NAME** - domain name used for external URLs, e.g. in
confirmation emails. If unset, Flask uses the request host.
- **PREFERRED_URL_SCHEME** - scheme used for URLs generated with
`url_for(..., _external=True)`. Default: `http`.
## 🚀 Production Deployment with uWSGI
To run the app in a production environment using **uWSGI**, follow these steps:
---
### 🔧 Step 1: Install uWSGI
Install uWSGI in your virtual environment:
```bash
pip install uwsgi
```
### Step 2: Create a wsgi.py File
Create a file named wsgi.py in the root directory (next to run.py):
```
from app import create_app
app = create_app()
```
### Step 3: Run uWSGI
Use the following command to launch the app on port 8000:
```
uwsgi --http :8000 --wsgi-file wsgi.py --callable app --master --processes 4 --threads 2
```