-
-
Notifications
You must be signed in to change notification settings - Fork 105
feat: update docker-compose for Proxmox/LXC environments with local persistence #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,24 +2,33 @@ services: | |||||||||||||||||
| backend: | ||||||||||||||||||
| image: zimengxiong/excalidash-backend:latest | ||||||||||||||||||
| container_name: excalidash-backend | ||||||||||||||||||
| environment: | ||||||||||||||||||
| - DATABASE_URL=file:/app/prisma/dev.db | ||||||||||||||||||
| - PORT=8000 | ||||||||||||||||||
| - NODE_ENV=production | ||||||||||||||||||
| - AUTH_MODE=${AUTH_MODE:-local} | ||||||||||||||||||
| #environment: | ||||||||||||||||||
| #- DATABASE_URL=file:/app/prisma/dev.db | ||||||||||||||||||
| #- PORT=8000 | ||||||||||||||||||
| #- NODE_ENV=production | ||||||||||||||||||
| #- AUTH_MODE=${AUTH_MODE:-local} | ||||||||||||||||||
| # Keep disabled by default; only enable when a trusted proxy sanitizes forwarded headers. | ||||||||||||||||||
| - TRUST_PROXY=false | ||||||||||||||||||
| #- TRUST_PROXY=false | ||||||||||||||||||
| # Optional for single-instance deployments: | ||||||||||||||||||
| # if unset, backend auto-generates and persists one in the volume. | ||||||||||||||||||
| # Recommended to set explicitly for portability and multi-instance setups. | ||||||||||||||||||
| - JWT_SECRET=${JWT_SECRET} | ||||||||||||||||||
| - CSRF_SECRET=${CSRF_SECRET} | ||||||||||||||||||
| #- JWT_SECRET=${JWT_SECRET} | ||||||||||||||||||
| #- CSRF_SECRET=${CSRF_SECRET} | ||||||||||||||||||
| # Optional OIDC settings (required for AUTH_MODE=hybrid or oidc_enforced) | ||||||||||||||||||
| # - OIDC_PROVIDER_NAME=Authentik | ||||||||||||||||||
| # - OIDC_ISSUER_URL=https://auth.example.com/application/o/excalidash/ | ||||||||||||||||||
| # - OIDC_CLIENT_ID=your-client-id | ||||||||||||||||||
| # - OIDC_CLIENT_SECRET=your-client-secret | ||||||||||||||||||
| # - OIDC_REDIRECT_URI=https://excalidash.example.com/api/auth/oidc/callback | ||||||||||||||||||
| environment: | ||||||||||||||||||
| - DATABASE_URL=file:/app/prisma/dev.db | ||||||||||||||||||
| - PORT=8000 | ||||||||||||||||||
| - NODE_ENV=production | ||||||||||||||||||
| - AUTH_MODE=local | ||||||||||||||||||
|
||||||||||||||||||
| - AUTH_MODE=local | |
| - AUTH_MODE=${AUTH_MODE:-local} |
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting TRUST_PROXY=true unconditionally is potentially insecure for a production configuration file. The original docker-compose.prod.yml correctly set TRUST_PROXY=false by default with a comment explaining it should only be enabled when a trusted proxy sanitizes forwarded headers. The README documentation also recommends setting this to a specific hop count (like 1) only when using a reverse proxy. Enabling this without a proper reverse proxy setup could allow header spoofing attacks.
| - TRUST_PROXY=true | |
| - TRUST_PROXY=false |
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The environment variable ALLOWED_ORIGIN is not used by the backend application. Based on the backend code (backend/src/config.ts and backend/src/index.ts), the correct variable name is FRONTEND_URL, not ALLOWED_ORIGIN. This variable will have no effect and CORS will not work as intended.
| - ALLOWED_ORIGIN=http://{{ip_server}}:6767 | |
| - FRONTEND_URL=http://{{ip_server}}:6767 |
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder '{{ip_server}}' is not valid syntax for docker-compose environment variables. This will be treated as a literal string, not interpolated. Users would need to manually edit this value to their actual IP address. Consider using ${SERVER_IP} syntax or removing this hardcoded value entirely and letting users provide it via environment variables.
| - ALLOWED_ORIGIN=http://{{ip_server}}:6767 | |
| - ALLOWED_ORIGIN=${ALLOWED_ORIGIN:-http://localhost:6767} |
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded secret 'outra_chave_secreta_aqui' (Portuguese for 'another_secret_key_here') should not be committed to the repository. This is a production compose file and should use environment variables for secrets. The original file correctly used CSRF_SECRET=${CSRF_SECRET} to allow secrets to be provided externally via .env file or environment variables.
| - JWT_SECRET=sua_chave_secreta_aqui | |
| - CSRF_SECRET=outra_chave_secreta_aqui | |
| - JWT_SECRET=${JWT_SECRET} | |
| - CSRF_SECRET=${CSRF_SECRET} |
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The environment variable NEXT_PUBLIC_BACKEND_URL mentioned in the PR description is not present in this docker-compose.prod.yml file and is not used anywhere in the codebase. The frontend uses BACKEND_URL (without the NEXT_PUBLIC_ prefix) for nginx proxy configuration, as shown in docker-compose.yml. If CORS issues were encountered, they should be resolved using the FRONTEND_URL variable on the backend, not a nonexistent frontend variable.
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded secret 'sua_chave_secreta_aqui' (Portuguese for 'your_secret_key_here') should not be committed to the repository. This is a production compose file and should use environment variables for secrets. The original file correctly used JWT_SECRET=${JWT_SECRET} to allow secrets to be provided externally via .env file or environment variables.
| - JWT_SECRET=sua_chave_secreta_aqui | |
| - CSRF_SECRET=outra_chave_secreta_aqui | |
| - JWT_SECRET=${JWT_SECRET} | |
| - CSRF_SECRET=${CSRF_SECRET} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original environment variable configuration has been commented out and duplicated below. This creates maintainability issues as there are now two sets of configuration (one commented, one active). The recommended approach is to either use the original configuration with proper environment variable substitution (${VAR}) or remove the commented section entirely to avoid confusion.