modified: README.rst
This commit is contained in:
parent
65df3368f3
commit
08fd4b1708
1 changed files with 14 additions and 13 deletions
27
README.rst
27
README.rst
|
|
@ -31,11 +31,14 @@ Configuration via Environment
|
|||
PyraLogs fetches settings from environment variables with sensible defaults:
|
||||
|
||||
- ``PYRALOGS_SECRET``
|
||||
The secret key for session signing.
|
||||
If missing, PyraLogs automatically generates a **random 64-character** string at runtime, which may log out all users.
|
||||
The secret key for cookie session signing.
|
||||
If missing, PyraLogs automatically generates a **random 64-character** string at runtime.
|
||||
Remove this file or change this value to log our all cookie sessions for all namespaces.
|
||||
|
||||
- ``PYRALOGS_JWT_SECRET``
|
||||
The secret key for signing JSON Web Tokens (JWTs). Defaults to the value of ``PYRALOGS_SECRET`` if not set.
|
||||
The secret key for signing JSON Web Tokens (JWTs) for agents without a mailbox.
|
||||
If missing, PyraLogs automatically generates a **random 64-character** string at runtime.
|
||||
Remove this file or change this value to log out all JWT agents for all namespaces.
|
||||
|
||||
- ``PYRALOGS_DB_URL``
|
||||
Connection string for the main database. Default: ``sqlite:///main.db``.
|
||||
|
|
@ -89,7 +92,7 @@ Local Setup
|
|||
export PYRALOGS_SECRET="YOUR_OWN_LONG_RANDOM_STRING"
|
||||
python app.py
|
||||
|
||||
If ``PYRALOGS_SECRET`` is **not** set, the app automatically generates a 64-character secret at runtime, which may log out all users.
|
||||
If ``PYRALOGS_SECRET`` is **not** set, the app automatically generates a 64-character secret at runtime.
|
||||
|
||||
6. **Access**
|
||||
|
||||
|
|
@ -108,7 +111,7 @@ Below is a sample Bash script showing how an **agent** might:
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Usage:
|
||||
# ./agent_send_log.sh "Your log message"
|
||||
# ./test_agent.sh "Your log message"
|
||||
#
|
||||
# Description:
|
||||
# Send a log message to the PyraLogs server using a JWT.
|
||||
|
|
@ -133,7 +136,8 @@ Below is a sample Bash script showing how an **agent** might:
|
|||
-H "Authorization: Bearer $JWT_TOKEN" \
|
||||
-d "{
|
||||
\"message\": \"$LOG_MESSAGE\",
|
||||
\"level\": \"INFO\"
|
||||
\"level\": \"INFO\",
|
||||
\"metadata\": {\"w\": 1}
|
||||
}")
|
||||
|
||||
echo "Server Response: $RESPONSE"
|
||||
|
|
@ -189,8 +193,6 @@ Below is an example Dockerfile that:
|
|||
COPY uwsgi.ini /app/uwsgi.ini
|
||||
|
||||
# Environment variables (optional overrides).
|
||||
# If PYRALOGS_SECRET is empty, the app itself generates a random 64-char secret & may log out all users.
|
||||
ENV PYRALOGS_SECRET=""
|
||||
ENV PYRALOGS_DB_URL="sqlite:///data/main.db"
|
||||
ENV PYRALOGS_HOST="0.0.0.0"
|
||||
ENV PYRALOGS_PORT="6544"
|
||||
|
|
@ -204,7 +206,6 @@ Below is an example Dockerfile that:
|
|||
VOLUME ["/data"]
|
||||
|
||||
# Command starts uWSGI and then starts Caddy
|
||||
# The app itself checks for PYRALOGS_SECRET and auto-generates one if missing.
|
||||
CMD ["/bin/sh", "-c", "\
|
||||
uwsgi --ini /app/uwsgi.ini & \
|
||||
caddy run --config /etc/caddy/Caddyfile \
|
||||
|
|
@ -229,12 +230,12 @@ Below is an example Dockerfile that:
|
|||
Tips
|
||||
====
|
||||
|
||||
- For **production**, you likely want to set up a real SMTP server or third-party service (e.g., Mailgun, SendGrid) and configure it via environment variables (``PYRALOGS_SMTP_HOST``, etc.).
|
||||
- For **production**, you likely want to set up a real SMTP server or third-party service (e.g., Mailgun, Improvmx) and configure it via environment variables (``PYRALOGS_SMTP_HOST``, etc.).
|
||||
- Ensure you mount a volume for persistent SQLite files if you want to avoid data loss when containers are removed or replaced.
|
||||
- Because the project is **public domain**, you can adapt it without restriction, removing features, adding custom logic, etc.
|
||||
- **Security Reminder**: Always keep your ``PYRALOGS_SECRET`` and ``PYRALOGS_JWT_SECRET`` secure. Do not expose them in your code repositories or logs.
|
||||
|
||||
License and Public Domain
|
||||
License & Public Domain
|
||||
=========================
|
||||
|
||||
This project is in the public domain. You are free to use, adapt, and redistribute it without attribution or additional licensing.
|
||||
|
|
@ -244,11 +245,11 @@ If you find PyraLogs helpful, feel free to contribute back or share your enhance
|
|||
Support and Contact
|
||||
===================
|
||||
|
||||
If you register a gitlab account, let me know, and I will grant you developer access to contribute.
|
||||
|
||||
- **Issues**: Please open tickets at the `PyraLogs project page <https://git.unturf.com/engineering/unturf/logs.unturf.com>`_.
|
||||
- For general inquiries, you can reach out to the maintainers directly.
|
||||
|
||||
We hope PyraLogs helps you set up a centralized logging solution quickly and efficiently!
|
||||
|
||||
If you register an account, let me know, and I will grant you developer access to contribute.
|
||||
|
||||
Enjoy and happy logging!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue