Skip to content

Commit 45a10e8

Browse files
authored
Merge pull request #42 from gamosoft/features/render-hosting
- use environment variables (breaking change in config!) - added session regeneration for security - added demo mode banners - added basics for render.com hosting (for online demo) - added new themes by @sudo-Harshk
2 parents 2e65730 + 6c3fee7 commit 45a10e8

File tree

12 files changed

+336
-51
lines changed

12 files changed

+336
-51
lines changed

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@ COPY generate_password.py .
3333
# Create data directory
3434
RUN mkdir -p data
3535

36-
# Expose port
36+
# Expose port (default, can be overridden)
3737
EXPOSE 8000
3838

39-
# Health check
39+
# Set default port (can be overridden via environment variable)
40+
ENV PORT=8000
41+
42+
# Health check (uses PORT env var)
4043
HEALTHCHECK --interval=60s --timeout=3s --start-period=5s --retries=3 \
41-
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"
44+
CMD python -c "import os, urllib.request; urllib.request.urlopen(f'http://localhost:{os.getenv(\"PORT\", \"8000\")}/health')"
4245

43-
# Run the application
44-
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
46+
# Run the application (shell form to allow environment variable expansion)
47+
CMD uvicorn backend.main:app --host 0.0.0.0 --port $PORT
4548

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ Use the pre-built image directly from GHCR - no building required!
8888
> # The documentation/ folder has app docs you can optionally mount
8989
> ```
9090
91-
> **🔐 Security Note**: Authentication is **disabled by default** with password `admin`. For testing/local use, this is fine. If exposing to a network, **change the password immediately** - see [AUTHENTICATION.md](documentation/AUTHENTICATION.md) for instructions on how to enable it.
91+
> **🔐 Security Note**: Authentication is **disabled by default** with password `admin`.
92+
> - ✅ **Local/Testing**: Default credentials are fine
93+
> - ⚠️ **Public Network**: Change password immediately - see [AUTHENTICATION.md](documentation/AUTHENTICATION.md)
94+
> - 🎭 **Demo Deployment**: Uses default "admin" password
9295
9396
**Option 1: Docker Compose (Recommended)**
9497
@@ -212,6 +215,7 @@ Want to learn more?
212215
- 🔌 **[PLUGINS.md](documentation/PLUGINS.md)** - Plugin system and available plugins
213216
- 🌐 **[API.md](documentation/API.md)** - REST API documentation and examples
214217
- 🔐 **[AUTHENTICATION.md](documentation/AUTHENTICATION.md)** - Enable password protection for your instance
218+
- 🔧 **[ENVIRONMENT_VARIABLES.md](documentation/ENVIRONMENT_VARIABLES.md)** - Configure settings via environment variables
215219

216220
💡 **Pro Tip:** If you clone this repository, you can mount the `documentation/` folder to view these docs inside the app:
217221

0 commit comments

Comments
 (0)