Add Dokploy deployment configuration - #51
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5643450ae9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| stop_grace_period: 340s | ||
| environment: | ||
| DEBUG: "0" | ||
| SECRET_KEY: ${SECRET_KEY:?Set the production Django signing key in Dokploy} |
There was a problem hiding this comment.
Forward required API settings into the container
The Compose service only injects variables listed in its environment configuration. If an enabled integration requires DMARC_API_KEY, omitting it leaves the empty settings default and authenticated uploads can return HTTP 401. Pass required integration settings through the runtime environment and document the supported variables.
| <div class="col-12"> | ||
| <div class="d-flex justify-content-between align-items-center mb-4"> | ||
| <h2>Manage CSP Report Endpoints</h2> | ||
| <a href="{% url 'create_csp_endpoint' %}" class="btn btn-primary">Create New Endpoint</a> |
There was a problem hiding this comment.
Register the CSP endpoint and report routes
The CSP feature added by this commit is unreachable: a repo-wide inspection of testing_platform/urls.py, testing/urls.py, and the views found no create_csp_endpoint, manage_csp_endpoints, or view_csp_reports routes and no collector for the displayed /csp/report/<uuid>/ URL. Consequently users cannot create or inspect these new models, and browsers cannot submit reports to them; add the corresponding views and URL patterns before deploying this feature.
Useful? React with 👍 / 👎.
| proxy_set_header Host $host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $original_proto; |
There was a problem hiding this comment.
Configure Django to trust the forwarded HTTPS scheme
When HTTPS terminates at a reverse proxy, Django needs the forwarded scheme to generate HTTPS absolute URLs, including password-reset links. Configure SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") when the trusted proxy sets that header.
Add a Dokploy Compose deployment with application and static-asset images, persistent database and upload mounts, configurable mail settings, and HTTPS forwarding through Traefik.
Startup requires a prepared database and does not initialize it or run migrations automatically. The change also includes a CSP schema migration.
Validation recorded for this PR: 19 deployment and web-test regressions pass locally, and Django CI passes on Python 3.12 and 3.13. The separate Python lint workflow reports pre-existing failures in unchanged files.
Release: patch.