No description
- Python 74.3%
- JavaScript 13.1%
- CSS 7.4%
- HTML 4.7%
- Shell 0.3%
- Other 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
prevents double sending messages when users press enter twice before the server acknowledges the message |
||
| backend | ||
| frontend | ||
| nginx | ||
| .gitignore | ||
| compose.yml | ||
| README.md | ||
Weekly Chat
Setup
.env file
HOST_PORT=8001
HOST='weaver.enigmatics.org'
URL_PREFIX='emergencyweekly'
DEBUG=true
OPENAI_API_KEY="<openai_api_key>"
OPENAI_MODEL="gpt-4o-mini"
OPENAI_INPUT_TOKEN_LIMIT="80000"
DEFAULT_SYSTEM_PROMPT="You are a funny discord chatter."
OIDC_CLIENT_ID="<client_id>"
OIDC_CLIENT_SECRET="<client_secret>"
OIDC_METADATA_URL="https://enigmatics.org/o/.well-known/openid-configuration"
POSTGRES_DB="chat"
POSTGRES_USER="chat"
POSTGRES_PASSWORD="<postgres_password>"
RABBITMQ_USER="rabbit"
RABBITMQ_PASS="<rabbitmq_password>"
compose.override.yml (for development)
services:
nginx:
volumes:
- ./nginx/dev.conf.d:/etc/nginx/conf.d:ro
django:
volumes:
- ./backend:/app
celery:
volumes:
- ./backend:/app
Note
With DEBUG=true, the django app will automatically reload on code changes. The celery app will not autoreload and can be restarted with
podman compose restart celery.
First Start
After the first start, log in to your account and promote it to admin in the shell with podman compose exec django python manage.py shell:
from chat.models import User
user = User.objects.first()
user.is_superuser = True
user.is_staff = True
user.save()