@cubocicloide/stack-react-django 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +33 -0
- package/README.md +66 -0
- package/dist/commands/lint/checks/BE/001.d.ts +6 -0
- package/dist/commands/lint/checks/BE/001.js +94 -0
- package/dist/commands/lint/checks/BE/001.js.map +1 -0
- package/dist/commands/lint/checks/BE/002.d.ts +6 -0
- package/dist/commands/lint/checks/BE/002.js +136 -0
- package/dist/commands/lint/checks/BE/002.js.map +1 -0
- package/dist/commands/lint/checks/BE/003.d.ts +6 -0
- package/dist/commands/lint/checks/BE/003.js +89 -0
- package/dist/commands/lint/checks/BE/003.js.map +1 -0
- package/dist/commands/lint/checks/BE/004.d.ts +6 -0
- package/dist/commands/lint/checks/BE/004.js +68 -0
- package/dist/commands/lint/checks/BE/004.js.map +1 -0
- package/dist/commands/lint/checks/BE/005.d.ts +6 -0
- package/dist/commands/lint/checks/BE/005.js +55 -0
- package/dist/commands/lint/checks/BE/005.js.map +1 -0
- package/dist/commands/lint/checks/BE/006.d.ts +6 -0
- package/dist/commands/lint/checks/BE/006.js +95 -0
- package/dist/commands/lint/checks/BE/006.js.map +1 -0
- package/dist/commands/lint/checks/BE/007.d.ts +6 -0
- package/dist/commands/lint/checks/BE/007.js +53 -0
- package/dist/commands/lint/checks/BE/007.js.map +1 -0
- package/dist/commands/lint/checks/BE/008.d.ts +6 -0
- package/dist/commands/lint/checks/BE/008.js +70 -0
- package/dist/commands/lint/checks/BE/008.js.map +1 -0
- package/dist/commands/lint/checks/BE/009.d.ts +6 -0
- package/dist/commands/lint/checks/BE/009.js +112 -0
- package/dist/commands/lint/checks/BE/009.js.map +1 -0
- package/dist/commands/lint/checks/BE/010.d.ts +6 -0
- package/dist/commands/lint/checks/BE/010.js +76 -0
- package/dist/commands/lint/checks/BE/010.js.map +1 -0
- package/dist/commands/lint/checks/BE/011.d.ts +6 -0
- package/dist/commands/lint/checks/BE/011.js +76 -0
- package/dist/commands/lint/checks/BE/011.js.map +1 -0
- package/dist/commands/lint/checks/BE/012.d.ts +6 -0
- package/dist/commands/lint/checks/BE/012.js +61 -0
- package/dist/commands/lint/checks/BE/012.js.map +1 -0
- package/dist/commands/lint/checks/BE/013.d.ts +6 -0
- package/dist/commands/lint/checks/BE/013.js +98 -0
- package/dist/commands/lint/checks/BE/013.js.map +1 -0
- package/dist/commands/lint/checks/BE/014.d.ts +6 -0
- package/dist/commands/lint/checks/BE/014.js +64 -0
- package/dist/commands/lint/checks/BE/014.js.map +1 -0
- package/dist/commands/lint/checks/E2E/001.d.ts +6 -0
- package/dist/commands/lint/checks/E2E/001.js +35 -0
- package/dist/commands/lint/checks/E2E/001.js.map +1 -0
- package/dist/commands/lint/checks/E2E/002.d.ts +6 -0
- package/dist/commands/lint/checks/E2E/002.js +37 -0
- package/dist/commands/lint/checks/E2E/002.js.map +1 -0
- package/dist/commands/lint/checks/E2E/003.d.ts +6 -0
- package/dist/commands/lint/checks/E2E/003.js +42 -0
- package/dist/commands/lint/checks/E2E/003.js.map +1 -0
- package/dist/commands/lint/checks/E2E/004.d.ts +6 -0
- package/dist/commands/lint/checks/E2E/004.js +37 -0
- package/dist/commands/lint/checks/E2E/004.js.map +1 -0
- package/dist/commands/lint/checks/E2E/005.d.ts +6 -0
- package/dist/commands/lint/checks/E2E/005.js +47 -0
- package/dist/commands/lint/checks/E2E/005.js.map +1 -0
- package/dist/commands/lint/checks/E2E/006.d.ts +6 -0
- package/dist/commands/lint/checks/E2E/006.js +28 -0
- package/dist/commands/lint/checks/E2E/006.js.map +1 -0
- package/dist/commands/lint/checks/E2E/007.d.ts +6 -0
- package/dist/commands/lint/checks/E2E/007.js +47 -0
- package/dist/commands/lint/checks/E2E/007.js.map +1 -0
- package/dist/commands/lint/checks/FE/001.d.ts +6 -0
- package/dist/commands/lint/checks/FE/001.js +56 -0
- package/dist/commands/lint/checks/FE/001.js.map +1 -0
- package/dist/commands/lint/checks/FE/002.d.ts +6 -0
- package/dist/commands/lint/checks/FE/002.js +80 -0
- package/dist/commands/lint/checks/FE/002.js.map +1 -0
- package/dist/commands/lint/checks/FE/003.d.ts +6 -0
- package/dist/commands/lint/checks/FE/003.js +65 -0
- package/dist/commands/lint/checks/FE/003.js.map +1 -0
- package/dist/commands/lint/checks/FE/004.d.ts +6 -0
- package/dist/commands/lint/checks/FE/004.js +72 -0
- package/dist/commands/lint/checks/FE/004.js.map +1 -0
- package/dist/commands/lint/checks/FE/005.d.ts +6 -0
- package/dist/commands/lint/checks/FE/005.js +103 -0
- package/dist/commands/lint/checks/FE/005.js.map +1 -0
- package/dist/commands/lint/checks/FE/006.d.ts +6 -0
- package/dist/commands/lint/checks/FE/006.js +102 -0
- package/dist/commands/lint/checks/FE/006.js.map +1 -0
- package/dist/commands/lint/checks/FE/007.d.ts +6 -0
- package/dist/commands/lint/checks/FE/007.js +60 -0
- package/dist/commands/lint/checks/FE/007.js.map +1 -0
- package/dist/commands/lint/checks/FE/008.d.ts +6 -0
- package/dist/commands/lint/checks/FE/008.js +115 -0
- package/dist/commands/lint/checks/FE/008.js.map +1 -0
- package/dist/commands/lint/checks/FE/009.d.ts +6 -0
- package/dist/commands/lint/checks/FE/009.js +83 -0
- package/dist/commands/lint/checks/FE/009.js.map +1 -0
- package/dist/commands/lint/checks/FE/010.d.ts +6 -0
- package/dist/commands/lint/checks/FE/010.js +105 -0
- package/dist/commands/lint/checks/FE/010.js.map +1 -0
- package/dist/commands/lint/checks/FE/011.d.ts +6 -0
- package/dist/commands/lint/checks/FE/011.js +43 -0
- package/dist/commands/lint/checks/FE/011.js.map +1 -0
- package/dist/commands/lint/checks/FE/012.d.ts +6 -0
- package/dist/commands/lint/checks/FE/012.js +150 -0
- package/dist/commands/lint/checks/FE/012.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3436 -0
- package/dist/index.js.map +1 -0
- package/dude.stack.json +13 -0
- package/package.json +43 -0
- package/templates/aws-ecs/backend/Dockerfile.prod +34 -0
- package/templates/aws-ecs/docs/docs/deploy.md.hbs +54 -0
- package/templates/aws-ecs/frontend/Dockerfile.prod +28 -0
- package/templates/aws-ecs/frontend/nginx.conf +21 -0
- package/templates/aws-ecs/iac/README.md.hbs +75 -0
- package/templates/aws-ecs/iac/_gitignore +14 -0
- package/templates/aws-ecs/iac/runner/Dockerfile +35 -0
- package/templates/aws-ecs/iac/terraform/bootstrap/main.tf.hbs +102 -0
- package/templates/aws-ecs/iac/terraform/bootstrap/outputs.tf +19 -0
- package/templates/aws-ecs/iac/terraform/bootstrap/variables.tf.hbs +17 -0
- package/templates/aws-ecs/iac/terraform/environments/dev/backend.hcl.hbs +12 -0
- package/templates/aws-ecs/iac/terraform/environments/dev/terraform.tfvars.hbs +43 -0
- package/templates/aws-ecs/iac/terraform/main.tf.hbs +949 -0
- package/templates/aws-ecs/iac/terraform/outputs.tf.hbs +71 -0
- package/templates/aws-ecs/iac/terraform/providers.tf +19 -0
- package/templates/aws-ecs/iac/terraform/variables.tf.hbs +113 -0
- package/templates/aws-ecs/iac/terraform/versions.tf +19 -0
- package/templates/base/.claude/agents/issue-fixer.md +190 -0
- package/templates/base/.claude/agents/security-fixer.md +250 -0
- package/templates/base/.claude/rules/BE/001.md +19 -0
- package/templates/base/.claude/rules/BE/002.md +21 -0
- package/templates/base/.claude/rules/BE/003.md +19 -0
- package/templates/base/.claude/rules/BE/004.md +16 -0
- package/templates/base/.claude/rules/BE/005.md +23 -0
- package/templates/base/.claude/rules/BE/006.md +13 -0
- package/templates/base/.claude/rules/BE/007.md +24 -0
- package/templates/base/.claude/rules/BE/008.md +19 -0
- package/templates/base/.claude/rules/BE/009.md +18 -0
- package/templates/base/.claude/rules/BE/010.md +15 -0
- package/templates/base/.claude/rules/BE/011.md +17 -0
- package/templates/base/.claude/rules/BE/012.md +18 -0
- package/templates/base/.claude/rules/BE/013.md +22 -0
- package/templates/base/.claude/rules/BE/014.md +15 -0
- package/templates/base/.claude/rules/E2E/001.md +13 -0
- package/templates/base/.claude/rules/E2E/002.md +14 -0
- package/templates/base/.claude/rules/E2E/003.md +10 -0
- package/templates/base/.claude/rules/E2E/004.md +23 -0
- package/templates/base/.claude/rules/E2E/005.md +15 -0
- package/templates/base/.claude/rules/E2E/006.md +13 -0
- package/templates/base/.claude/rules/E2E/007.md +18 -0
- package/templates/base/.claude/rules/FE/001.md +22 -0
- package/templates/base/.claude/rules/FE/002.md +39 -0
- package/templates/base/.claude/rules/FE/003.md +19 -0
- package/templates/base/.claude/rules/FE/004.md +21 -0
- package/templates/base/.claude/rules/FE/005.md +33 -0
- package/templates/base/.claude/rules/FE/006.md +24 -0
- package/templates/base/.claude/rules/FE/007.md +19 -0
- package/templates/base/.claude/rules/FE/008.md +26 -0
- package/templates/base/.claude/rules/FE/009.md +30 -0
- package/templates/base/.claude/rules/FE/010.md +25 -0
- package/templates/base/.claude/rules/FE/011.md +22 -0
- package/templates/base/.claude/rules/FE/012.md +32 -0
- package/templates/base/.claude/settings.json +53 -0
- package/templates/base/.claude/skills/clean-branches/SKILL.md +100 -0
- package/templates/base/.claude/skills/create/SKILL.md +47 -0
- package/templates/base/.claude/skills/create-jira-issue/SKILL.md +174 -0
- package/templates/base/.claude/skills/create-page/SKILL.md +195 -0
- package/templates/base/.claude/skills/create-route/SKILL.md +156 -0
- package/templates/base/.claude/skills/draft-email/SKILL.md +104 -0
- package/templates/base/.claude/skills/fix-issues/SKILL.md +238 -0
- package/templates/base/.claude/skills/security-scan/SKILL.md +297 -0
- package/templates/base/.claude/skills/verify-security-fixes/SKILL.md +180 -0
- package/templates/base/.dude/commands/README.md +85 -0
- package/templates/base/.dude/commands/hello.ts +34 -0
- package/templates/base/.dude/lint/checks/PRJ/001.ts +26 -0
- package/templates/base/.dude/lint/checks/README.md +69 -0
- package/templates/base/.vscode/tasks.json +44 -0
- package/templates/base/.worktreeinclude +2 -0
- package/templates/base/CLAUDE.md.hbs +391 -0
- package/templates/base/README.md.hbs +188 -0
- package/templates/base/_env.example.hbs +39 -0
- package/templates/base/_env.hbs +35 -0
- package/templates/base/_gitignore +31 -0
- package/templates/base/_npmrc +2 -0
- package/templates/base/backend/Dockerfile +16 -0
- package/templates/base/backend/README.md.hbs +90 -0
- package/templates/base/backend/_dockerignore +12 -0
- package/templates/base/backend/apps/__init__.py +0 -0
- package/templates/base/backend/apps/core/__init__.py +0 -0
- package/templates/base/backend/apps/core/apps.py +6 -0
- package/templates/base/backend/apps/core/serializers.py +7 -0
- package/templates/base/backend/apps/core/tests/__init__.py +0 -0
- package/templates/base/backend/apps/core/tests/test_views.py +16 -0
- package/templates/base/backend/apps/core/urls.py +9 -0
- package/templates/base/backend/apps/core/views.py +24 -0
- package/templates/base/backend/apps/users/__init__.py +0 -0
- package/templates/base/backend/apps/users/admin.py +6 -0
- package/templates/base/backend/apps/users/apps.py +6 -0
- package/templates/base/backend/apps/users/migrations/0001_initial.py +41 -0
- package/templates/base/backend/apps/users/migrations/__init__.py +0 -0
- package/templates/base/backend/apps/users/models.py +15 -0
- package/templates/base/backend/apps/users/serializers.py +16 -0
- package/templates/base/backend/apps/users/services.py +25 -0
- package/templates/base/backend/apps/users/tests/__init__.py +0 -0
- package/templates/base/backend/apps/users/tests/test_models.py +30 -0
- package/templates/base/backend/apps/users/tests/test_views.py +55 -0
- package/templates/base/backend/apps/users/urls.py +10 -0
- package/templates/base/backend/apps/users/views.py +20 -0
- package/templates/base/backend/config/__init__.py.hbs +5 -0
- package/templates/base/backend/config/asgi.py +9 -0
- package/templates/base/backend/config/settings/__init__.py +0 -0
- package/templates/base/backend/config/settings/base.py.hbs +197 -0
- package/templates/base/backend/config/settings/local.py +31 -0
- package/templates/base/backend/config/settings/production.py.hbs +37 -0
- package/templates/base/backend/config/urls.py.hbs +22 -0
- package/templates/base/backend/config/wsgi.py +9 -0
- package/templates/base/backend/manage.py +23 -0
- package/templates/base/backend/pyproject.toml.hbs +48 -0
- package/templates/base/backend/start.sh +5 -0
- package/templates/base/docker-compose.yml.hbs +196 -0
- package/templates/base/docs/docs/api.md +21 -0
- package/templates/base/docs/docs/dude.md.hbs +305 -0
- package/templates/base/docs/docs/index.md.hbs +92 -0
- package/templates/base/docs/docs/mkdocs.md +231 -0
- package/templates/base/docs/mkdocs.yml.hbs +52 -0
- package/templates/base/e2e/.prettierrc.json +1 -0
- package/templates/base/e2e/_prettierignore +3 -0
- package/templates/base/e2e/cucumber.js +21 -0
- package/templates/base/e2e/eslint.config.mjs +14 -0
- package/templates/base/e2e/features/example.feature +13 -0
- package/templates/base/e2e/package.json.hbs +30 -0
- package/templates/base/e2e/pages/ExamplePage.ts +16 -0
- package/templates/base/e2e/playwright.config.ts +27 -0
- package/templates/base/e2e/steps/common.steps.ts +32 -0
- package/templates/base/e2e/steps/example.steps.ts +4 -0
- package/templates/base/e2e/support/hooks.ts +72 -0
- package/templates/base/e2e/support/world.ts +24 -0
- package/templates/base/e2e/tsconfig.json +22 -0
- package/templates/base/frontend/.prettierrc.json +6 -0
- package/templates/base/frontend/Dockerfile +10 -0
- package/templates/base/frontend/_dockerignore +4 -0
- package/templates/base/frontend/eslint.config.js +32 -0
- package/templates/base/frontend/index.html.hbs +13 -0
- package/templates/base/frontend/package.json.hbs +38 -0
- package/templates/base/frontend/public/favicon.svg +5 -0
- package/templates/base/frontend/src/$components/Layout/$assets/logo.svg +5 -0
- package/templates/base/frontend/src/$components/Layout/constants.tsx +8 -0
- package/templates/base/frontend/src/$components/Layout/index.tsx +80 -0
- package/templates/base/frontend/src/$components/Layout/types.tsx +9 -0
- package/templates/base/frontend/src/$components/index.tsx +1 -0
- package/templates/base/frontend/src/$hooks/index.tsx +2 -0
- package/templates/base/frontend/src/$hooks/useCounterStore/index.tsx +28 -0
- package/templates/base/frontend/src/$hooks/useCounterStore/types.tsx +7 -0
- package/templates/base/frontend/src/$hooks/usePageTitle/index.tsx +21 -0
- package/templates/base/frontend/src/$types/vite-env.d.ts +10 -0
- package/templates/base/frontend/src/App.tsx +36 -0
- package/templates/base/frontend/src/main.tsx +10 -0
- package/templates/base/frontend/src/openapi/utils/openapi.yaml.hbs +129 -0
- package/templates/base/frontend/src/pages/constants.tsx +31 -0
- package/templates/base/frontend/src/pages/index.tsx +192 -0
- package/templates/base/frontend/src/pages/types.tsx +6 -0
- package/templates/base/frontend/src/pages/users/[id]/index.tsx +53 -0
- package/templates/base/frontend/src/pages/users/index.tsx +57 -0
- package/templates/base/frontend/src/pages/users/types.tsx +4 -0
- package/templates/base/frontend/src/styles.module.css +7 -0
- package/templates/base/frontend/src/utils/constants.tsx +11 -0
- package/templates/base/frontend/src/utils/formatters/index.tsx +49 -0
- package/templates/base/frontend/src/utils/functions.tsx +70 -0
- package/templates/base/frontend/src/utils/index.tsx +3 -0
- package/templates/base/frontend/tsconfig.json +24 -0
- package/templates/base/frontend/vite.config.ts +20 -0
- package/templates/base/package.json.hbs +11 -0
- package/templates/base/security/baseline.json +4 -0
- package/templates/celery/backend/apps/core/tasks.py +14 -0
- package/templates/celery/backend/apps/core/tests/test_tasks.py +6 -0
- package/templates/celery/backend/config/celery.py.hbs +26 -0
- package/templates/celerybeat/backend/apps/core/tasks_scheduled.py +18 -0
- package/templates/celerybeat/backend/apps/core/tests/test_tasks_scheduled.py +6 -0
- package/templates/postgres/.dude/commands/reset.ts +83 -0
- package/templates/s3/backend/apps/files/__init__.py +0 -0
- package/templates/s3/backend/apps/files/admin.py +9 -0
- package/templates/s3/backend/apps/files/apps.py +6 -0
- package/templates/s3/backend/apps/files/migrations/0001_initial.py +29 -0
- package/templates/s3/backend/apps/files/migrations/__init__.py +0 -0
- package/templates/s3/backend/apps/files/models.py +21 -0
- package/templates/s3/backend/apps/files/serializers.py +27 -0
- package/templates/s3/backend/apps/files/services.py +19 -0
- package/templates/s3/backend/apps/files/tests/__init__.py +0 -0
- package/templates/s3/backend/apps/files/tests/test_models.py +10 -0
- package/templates/s3/backend/apps/files/tests/test_views.py +32 -0
- package/templates/s3/backend/apps/files/urls.py +10 -0
- package/templates/s3/backend/apps/files/views.py +29 -0
- package/templates/s3/frontend/src/openapi/utils/openapi.yaml.hbs +253 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"""Base Django settings shared by every environment.
|
|
2
|
+
|
|
3
|
+
Environment-specific settings live in ``local.py`` (development) and
|
|
4
|
+
``production.py`` (deployed). Pick one with ``DJANGO_SETTINGS_MODULE``
|
|
5
|
+
(default: ``config.settings.local``).
|
|
6
|
+
|
|
7
|
+
Note: ``SECRET_KEY`` and ``DEBUG`` are intentionally **not** defined here —
|
|
8
|
+
``local.py`` provides safe development values, ``production.py`` requires them
|
|
9
|
+
from the environment.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
|
|
14
|
+
import environ
|
|
15
|
+
|
|
16
|
+
env = environ.Env()
|
|
17
|
+
|
|
18
|
+
# backend/ directory (contains manage.py) — /app inside the container
|
|
19
|
+
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
|
20
|
+
|
|
21
|
+
# ── Application definition ────────────────────────────────────────────────────
|
|
22
|
+
|
|
23
|
+
DJANGO_APPS = [
|
|
24
|
+
"django.contrib.admin",
|
|
25
|
+
"django.contrib.auth",
|
|
26
|
+
"django.contrib.contenttypes",
|
|
27
|
+
"django.contrib.sessions",
|
|
28
|
+
"django.contrib.messages",
|
|
29
|
+
"django.contrib.staticfiles",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
THIRD_PARTY_APPS = [
|
|
33
|
+
"rest_framework",
|
|
34
|
+
"drf_spectacular",
|
|
35
|
+
"corsheaders",
|
|
36
|
+
{{#if withS3}}
|
|
37
|
+
"storages",
|
|
38
|
+
{{/if}}
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
LOCAL_APPS = [
|
|
42
|
+
"apps.core",
|
|
43
|
+
"apps.users",
|
|
44
|
+
{{#if withS3}}
|
|
45
|
+
"apps.files",
|
|
46
|
+
{{/if}}
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
|
|
50
|
+
|
|
51
|
+
MIDDLEWARE = [
|
|
52
|
+
"django.middleware.security.SecurityMiddleware",
|
|
53
|
+
"whitenoise.middleware.WhiteNoiseMiddleware",
|
|
54
|
+
"django.contrib.sessions.middleware.SessionMiddleware",
|
|
55
|
+
"corsheaders.middleware.CorsMiddleware",
|
|
56
|
+
"django.middleware.common.CommonMiddleware",
|
|
57
|
+
"django.middleware.csrf.CsrfViewMiddleware",
|
|
58
|
+
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
|
59
|
+
"django.contrib.messages.middleware.MessageMiddleware",
|
|
60
|
+
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
ROOT_URLCONF = "config.urls"
|
|
64
|
+
|
|
65
|
+
TEMPLATES = [
|
|
66
|
+
{
|
|
67
|
+
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
68
|
+
"DIRS": [],
|
|
69
|
+
"APP_DIRS": True,
|
|
70
|
+
"OPTIONS": {
|
|
71
|
+
"context_processors": [
|
|
72
|
+
"django.template.context_processors.debug",
|
|
73
|
+
"django.template.context_processors.request",
|
|
74
|
+
"django.contrib.auth.context_processors.auth",
|
|
75
|
+
"django.contrib.messages.context_processors.messages",
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
WSGI_APPLICATION = "config.wsgi.application"
|
|
82
|
+
|
|
83
|
+
# ── Database ──────────────────────────────────────────────────────────────────
|
|
84
|
+
# SQLite by default; set DATABASE_URL (e.g. postgres://…) to override.
|
|
85
|
+
|
|
86
|
+
DATABASES = {"default": env.db("DATABASE_URL", default=f"sqlite:///{BASE_DIR / 'db.sqlite3'}")}
|
|
87
|
+
|
|
88
|
+
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
|
89
|
+
|
|
90
|
+
# ── Authentication ────────────────────────────────────────────────────────────
|
|
91
|
+
|
|
92
|
+
AUTH_USER_MODEL = "users.User"
|
|
93
|
+
|
|
94
|
+
AUTH_PASSWORD_VALIDATORS = [
|
|
95
|
+
{"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"},
|
|
96
|
+
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
|
|
97
|
+
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
|
|
98
|
+
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
# ── Internationalisation ──────────────────────────────────────────────────────
|
|
102
|
+
|
|
103
|
+
LANGUAGE_CODE = "en-us"
|
|
104
|
+
TIME_ZONE = "UTC"
|
|
105
|
+
USE_I18N = True
|
|
106
|
+
USE_TZ = True
|
|
107
|
+
|
|
108
|
+
# ── Static & media files ──────────────────────────────────────────────────────
|
|
109
|
+
# STATIC_URL is namespaced so an edge router (e.g. an ALB) can path-route
|
|
110
|
+
# /django-static/* to the backend without colliding with the frontend assets.
|
|
111
|
+
|
|
112
|
+
STATIC_URL = "/django-static/"
|
|
113
|
+
STATIC_ROOT = BASE_DIR / "staticfiles"
|
|
114
|
+
|
|
115
|
+
MEDIA_URL = "/media/"
|
|
116
|
+
MEDIA_ROOT = BASE_DIR / "media"
|
|
117
|
+
|
|
118
|
+
STORAGES = {
|
|
119
|
+
{{#if withS3}}
|
|
120
|
+
# Object storage — S3 in production, MinIO locally (AWS_S3_ENDPOINT_URL).
|
|
121
|
+
"default": {
|
|
122
|
+
"BACKEND": "storages.backends.s3.S3Storage",
|
|
123
|
+
},
|
|
124
|
+
{{else}}
|
|
125
|
+
"default": {
|
|
126
|
+
"BACKEND": "django.core.files.storage.FileSystemStorage",
|
|
127
|
+
},
|
|
128
|
+
{{/if}}
|
|
129
|
+
# production.py switches this to whitenoise's compressed manifest storage.
|
|
130
|
+
"staticfiles": {
|
|
131
|
+
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
|
|
132
|
+
},
|
|
133
|
+
}
|
|
134
|
+
{{#if withS3}}
|
|
135
|
+
|
|
136
|
+
# django-storages (S3) configuration — MinIO locally, real S3 in production
|
|
137
|
+
# (leave AWS_S3_ENDPOINT_URL unset outside local development).
|
|
138
|
+
AWS_ACCESS_KEY_ID = env("AWS_ACCESS_KEY_ID", default=None)
|
|
139
|
+
AWS_SECRET_ACCESS_KEY = env("AWS_SECRET_ACCESS_KEY", default=None)
|
|
140
|
+
AWS_STORAGE_BUCKET_NAME = env("AWS_STORAGE_BUCKET_NAME", default="{{projectName}}-media")
|
|
141
|
+
AWS_S3_ENDPOINT_URL = env("AWS_S3_ENDPOINT_URL", default="") or None
|
|
142
|
+
AWS_S3_REGION_NAME = env("AWS_S3_REGION_NAME", default=None)
|
|
143
|
+
AWS_S3_FILE_OVERWRITE = False
|
|
144
|
+
AWS_DEFAULT_ACL = None
|
|
145
|
+
AWS_QUERYSTRING_AUTH = True # serve files via presigned URLs
|
|
146
|
+
{{/if}}
|
|
147
|
+
|
|
148
|
+
# ── Django REST Framework ─────────────────────────────────────────────────────
|
|
149
|
+
|
|
150
|
+
REST_FRAMEWORK = {
|
|
151
|
+
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
|
152
|
+
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
|
|
153
|
+
"PAGE_SIZE": 50,
|
|
154
|
+
# Secure by default — individual views opt out with an explicit
|
|
155
|
+
# `permission_classes` declaration (required by lint rule BE003).
|
|
156
|
+
"DEFAULT_PERMISSION_CLASSES": ["rest_framework.permissions.IsAuthenticated"],
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
SPECTACULAR_SETTINGS = {
|
|
160
|
+
"TITLE": env("APP_TITLE", default="{{projectName}}") + " API",
|
|
161
|
+
"VERSION": "1.0.0",
|
|
162
|
+
"SERVE_INCLUDE_SCHEMA": False,
|
|
163
|
+
}
|
|
164
|
+
{{#if withCelery}}
|
|
165
|
+
|
|
166
|
+
# ── Celery ────────────────────────────────────────────────────────────────────
|
|
167
|
+
# Read by config/celery.py via the CELERY_ settings namespace.
|
|
168
|
+
|
|
169
|
+
CELERY_BROKER_URL = env("CELERY_BROKER_URL", default="redis://redis:6379/0")
|
|
170
|
+
CELERY_RESULT_BACKEND = env("CELERY_RESULT_BACKEND", default="redis://redis:6379/0")
|
|
171
|
+
CELERY_TASK_ALWAYS_EAGER = False # tests flip this on via a fixture / settings override
|
|
172
|
+
{{/if}}
|
|
173
|
+
|
|
174
|
+
# ── Logging ───────────────────────────────────────────────────────────────────
|
|
175
|
+
# Console logging only — containers forward stdout/stderr. Use
|
|
176
|
+
# `logging.getLogger(__name__)` in application code (never `print`, BE012).
|
|
177
|
+
|
|
178
|
+
LOGGING = {
|
|
179
|
+
"version": 1,
|
|
180
|
+
"disable_existing_loggers": False,
|
|
181
|
+
"formatters": {
|
|
182
|
+
"verbose": {
|
|
183
|
+
"format": "{levelname} {asctime} {name} {message}",
|
|
184
|
+
"style": "{",
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
"handlers": {
|
|
188
|
+
"console": {
|
|
189
|
+
"class": "logging.StreamHandler",
|
|
190
|
+
"formatter": "verbose",
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
"root": {
|
|
194
|
+
"handlers": ["console"],
|
|
195
|
+
"level": "INFO",
|
|
196
|
+
},
|
|
197
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Development settings — the default (DJANGO_SETTINGS_MODULE=config.settings.local).
|
|
2
|
+
|
|
3
|
+
This is the only settings module allowed to carry an insecure SECRET_KEY
|
|
4
|
+
fallback and DEBUG=True (lint rule BE007).
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .base import * # noqa: F401,F403
|
|
8
|
+
from .base import env
|
|
9
|
+
|
|
10
|
+
SECRET_KEY = env("DJANGO_SECRET_KEY", default="dev-insecure-key-change-me") # noqa: S105
|
|
11
|
+
|
|
12
|
+
DEBUG = env.bool("DJANGO_DEBUG", default=True)
|
|
13
|
+
|
|
14
|
+
ALLOWED_HOSTS = ["*"]
|
|
15
|
+
|
|
16
|
+
# Serve static files straight from the app/package sources in development —
|
|
17
|
+
# no collectstatic needed (and no "missing staticfiles/" warning).
|
|
18
|
+
WHITENOISE_USE_FINDERS = True
|
|
19
|
+
WHITENOISE_AUTOREFRESH = True
|
|
20
|
+
|
|
21
|
+
# The Vite dev server (http://localhost:5173) proxies /api to the backend, but
|
|
22
|
+
# allow direct cross-origin calls during development too.
|
|
23
|
+
CORS_ALLOWED_ORIGINS = [
|
|
24
|
+
"http://localhost:5173",
|
|
25
|
+
"http://127.0.0.1:5173",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
CSRF_TRUSTED_ORIGINS = [
|
|
29
|
+
"http://localhost:5173",
|
|
30
|
+
"http://127.0.0.1:5173",
|
|
31
|
+
]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Production settings — everything security-sensitive comes from the environment.
|
|
2
|
+
|
|
3
|
+
Required environment variables:
|
|
4
|
+
DJANGO_SECRET_KEY — no fallback, the process refuses to start without it
|
|
5
|
+
DJANGO_ALLOWED_HOSTS — comma-separated, e.g. "api.example.com"
|
|
6
|
+
DATABASE_URL — e.g. postgres://user:pass@host:5432/dbname
|
|
7
|
+
|
|
8
|
+
Optional:
|
|
9
|
+
DJANGO_CSRF_TRUSTED_ORIGINS — comma-separated origins, e.g. "https://app.example.com"
|
|
10
|
+
DJANGO_CORS_ALLOWED_ORIGINS — comma-separated origins allowed to call the API
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from .base import * # noqa: F401,F403
|
|
14
|
+
from .base import STORAGES, env
|
|
15
|
+
|
|
16
|
+
SECRET_KEY = env("DJANGO_SECRET_KEY")
|
|
17
|
+
|
|
18
|
+
DEBUG = False
|
|
19
|
+
|
|
20
|
+
ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS")
|
|
21
|
+
|
|
22
|
+
CSRF_TRUSTED_ORIGINS = env.list("DJANGO_CSRF_TRUSTED_ORIGINS", default=[])
|
|
23
|
+
|
|
24
|
+
CORS_ALLOWED_ORIGINS = env.list("DJANGO_CORS_ALLOWED_ORIGINS", default=[])
|
|
25
|
+
|
|
26
|
+
# Behind a TLS-terminating load balancer / reverse proxy.
|
|
27
|
+
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
|
28
|
+
SESSION_COOKIE_SECURE = True
|
|
29
|
+
CSRF_COOKIE_SECURE = True
|
|
30
|
+
|
|
31
|
+
# The database must be explicitly configured in production — no SQLite fallback.
|
|
32
|
+
DATABASES = {"default": env.db("DATABASE_URL")}
|
|
33
|
+
|
|
34
|
+
# Whitenoise serves collected static files (run `manage.py collectstatic`).
|
|
35
|
+
STORAGES["staticfiles"] = {
|
|
36
|
+
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
|
|
37
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Root URL configuration for {{projectName}}.
|
|
2
|
+
|
|
3
|
+
Every API app is mounted under the ``api/`` prefix (lint rule BE008); each app
|
|
4
|
+
declares its own routes (and an ``app_name``) in ``apps/<app>/urls.py``.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from django.contrib import admin
|
|
8
|
+
from django.urls import include, path
|
|
9
|
+
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
|
10
|
+
|
|
11
|
+
urlpatterns = [
|
|
12
|
+
path("admin/", admin.site.urls),
|
|
13
|
+
# API apps
|
|
14
|
+
path("api/", include("apps.core.urls")),
|
|
15
|
+
path("api/", include("apps.users.urls")),
|
|
16
|
+
{{#if withS3}}
|
|
17
|
+
path("api/", include("apps.files.urls")),
|
|
18
|
+
{{/if}}
|
|
19
|
+
# OpenAPI schema + interactive docs (drf-spectacular)
|
|
20
|
+
path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
|
|
21
|
+
path("api/docs/", SpectacularSwaggerView.as_view(url_name="schema"), name="docs"),
|
|
22
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""Django's command-line utility for administrative tasks."""
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def main() -> None:
|
|
9
|
+
"""Run administrative tasks."""
|
|
10
|
+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
|
|
11
|
+
try:
|
|
12
|
+
from django.core.management import execute_from_command_line
|
|
13
|
+
except ImportError as exc:
|
|
14
|
+
raise ImportError(
|
|
15
|
+
"Couldn't import Django. Are you sure it's installed and available on "
|
|
16
|
+
"your PYTHONPATH environment variable? Did you forget to activate a "
|
|
17
|
+
"virtual environment?"
|
|
18
|
+
) from exc
|
|
19
|
+
execute_from_command_line(sys.argv)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if __name__ == "__main__":
|
|
23
|
+
main()
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "{{projectName}}-backend"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Django REST Framework backend for {{projectName}}"
|
|
5
|
+
requires-python = ">=3.13"
|
|
6
|
+
dependencies = [
|
|
7
|
+
"django>=5.1",
|
|
8
|
+
"djangorestframework>=3.15.0",
|
|
9
|
+
"drf-spectacular>=0.28.0",
|
|
10
|
+
"django-environ>=0.11.0",
|
|
11
|
+
"django-cors-headers>=4.6.0",
|
|
12
|
+
"whitenoise>=6.8.0",
|
|
13
|
+
"gunicorn>=23.0.0",
|
|
14
|
+
{{#if withPostgres}}
|
|
15
|
+
"psycopg[binary]>=3.2.0",
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{#if withS3}}
|
|
18
|
+
"django-storages[boto3]>=1.14.0",
|
|
19
|
+
{{/if}}
|
|
20
|
+
{{#if withCelery}}
|
|
21
|
+
"celery[redis]>=5.4.0",
|
|
22
|
+
{{/if}}
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[dependency-groups]
|
|
26
|
+
dev = [
|
|
27
|
+
"pytest>=8.0.0",
|
|
28
|
+
"pytest-django>=4.9.0",
|
|
29
|
+
"ruff>=0.7.0",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[tool.pytest.ini_options]
|
|
33
|
+
DJANGO_SETTINGS_MODULE = "config.settings.local"
|
|
34
|
+
testpaths = ["apps"]
|
|
35
|
+
python_files = ["test_*.py"]
|
|
36
|
+
|
|
37
|
+
[tool.ruff]
|
|
38
|
+
line-length = 100
|
|
39
|
+
target-version = "py313"
|
|
40
|
+
|
|
41
|
+
[tool.ruff.lint]
|
|
42
|
+
select = ["E", "F", "I", "N", "UP", "B", "S", "RUF"]
|
|
43
|
+
|
|
44
|
+
[tool.ruff.lint.per-file-ignores]
|
|
45
|
+
# Tests use asserts (S101) and throw-away credentials (S105/S106).
|
|
46
|
+
"apps/*/tests/*" = ["S101", "S105", "S106"]
|
|
47
|
+
# Hand-written / autogenerated migrations may exceed the line length.
|
|
48
|
+
"apps/*/migrations/*" = ["E501"]
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
services:
|
|
2
|
+
backend:
|
|
3
|
+
build:
|
|
4
|
+
context: ./backend
|
|
5
|
+
dockerfile: Dockerfile
|
|
6
|
+
ports:
|
|
7
|
+
- "8000:8000"
|
|
8
|
+
restart: unless-stopped
|
|
9
|
+
environment:
|
|
10
|
+
APP_TITLE: ${APP_TITLE:-app}
|
|
11
|
+
DJANGO_DEBUG: ${DJANGO_DEBUG:-true}
|
|
12
|
+
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE:-config.settings.local}
|
|
13
|
+
{{#if withPostgres}}
|
|
14
|
+
DATABASE_URL: ${DATABASE_URL:-postgres://postgres:postgres@postgres:5432/app}
|
|
15
|
+
{{/if}}
|
|
16
|
+
{{#if withS3}}
|
|
17
|
+
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-minioadmin}
|
|
18
|
+
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-minioadmin}
|
|
19
|
+
AWS_STORAGE_BUCKET_NAME: ${AWS_STORAGE_BUCKET_NAME:-{{projectName}}-media}
|
|
20
|
+
AWS_S3_ENDPOINT_URL: ${AWS_S3_ENDPOINT_URL:-http://minio:9000}
|
|
21
|
+
AWS_S3_REGION_NAME: ${AWS_S3_REGION_NAME:-us-east-1}
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{#if withRedis}}
|
|
24
|
+
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
|
|
25
|
+
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379/0}
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{#if withPostgres}}
|
|
28
|
+
depends_on:
|
|
29
|
+
postgres:
|
|
30
|
+
condition: service_healthy
|
|
31
|
+
{{#if withS3}}
|
|
32
|
+
minio:
|
|
33
|
+
condition: service_healthy
|
|
34
|
+
{{/if}}
|
|
35
|
+
{{else}}
|
|
36
|
+
{{#if withS3}}
|
|
37
|
+
depends_on:
|
|
38
|
+
minio:
|
|
39
|
+
condition: service_healthy
|
|
40
|
+
{{/if}}
|
|
41
|
+
{{/if}}
|
|
42
|
+
volumes:
|
|
43
|
+
- ./backend:/app
|
|
44
|
+
- /app/.venv
|
|
45
|
+
|
|
46
|
+
frontend:
|
|
47
|
+
build:
|
|
48
|
+
context: ./frontend
|
|
49
|
+
dockerfile: Dockerfile
|
|
50
|
+
ports:
|
|
51
|
+
- "5173:5173"
|
|
52
|
+
depends_on:
|
|
53
|
+
- backend
|
|
54
|
+
restart: unless-stopped
|
|
55
|
+
environment:
|
|
56
|
+
VITE_APP_TITLE: ${VITE_APP_TITLE:-app}
|
|
57
|
+
VITE_REACT_QUERY_DEVTOOLS: ${VITE_REACT_QUERY_DEVTOOLS:-false}
|
|
58
|
+
BACKEND_URL: http://backend:8000
|
|
59
|
+
volumes:
|
|
60
|
+
- ./frontend:/app
|
|
61
|
+
- /app/node_modules
|
|
62
|
+
{{#if withPostgres}}
|
|
63
|
+
|
|
64
|
+
postgres:
|
|
65
|
+
image: postgres:17-alpine
|
|
66
|
+
restart: unless-stopped
|
|
67
|
+
environment:
|
|
68
|
+
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
69
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
70
|
+
POSTGRES_DB: ${POSTGRES_DB:-app}
|
|
71
|
+
ports:
|
|
72
|
+
- "5432:5432"
|
|
73
|
+
volumes:
|
|
74
|
+
- postgres_data:/var/lib/postgresql/data
|
|
75
|
+
healthcheck:
|
|
76
|
+
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-postgres}"]
|
|
77
|
+
interval: 5s
|
|
78
|
+
timeout: 5s
|
|
79
|
+
retries: 10
|
|
80
|
+
{{/if}}
|
|
81
|
+
{{#if withS3}}
|
|
82
|
+
|
|
83
|
+
minio:
|
|
84
|
+
image: minio/minio:latest
|
|
85
|
+
restart: unless-stopped
|
|
86
|
+
command: server /data --console-address ":9001"
|
|
87
|
+
environment:
|
|
88
|
+
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID:-minioadmin}
|
|
89
|
+
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY:-minioadmin}
|
|
90
|
+
ports:
|
|
91
|
+
- "9000:9000"
|
|
92
|
+
- "9001:9001"
|
|
93
|
+
volumes:
|
|
94
|
+
- minio_data:/data
|
|
95
|
+
healthcheck:
|
|
96
|
+
test: ["CMD", "mc", "ready", "local"]
|
|
97
|
+
interval: 5s
|
|
98
|
+
timeout: 5s
|
|
99
|
+
retries: 10
|
|
100
|
+
|
|
101
|
+
minio_setup:
|
|
102
|
+
image: minio/mc:latest
|
|
103
|
+
depends_on:
|
|
104
|
+
minio:
|
|
105
|
+
condition: service_healthy
|
|
106
|
+
entrypoint: >
|
|
107
|
+
/bin/sh -c "
|
|
108
|
+
mc alias set local http://minio:9000 $${MINIO_ROOT_USER:-minioadmin} $${MINIO_ROOT_PASSWORD:-minioadmin} &&
|
|
109
|
+
mc mb --ignore-existing local/$${BUCKET_NAME:-{{projectName}}-media}
|
|
110
|
+
"
|
|
111
|
+
environment:
|
|
112
|
+
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID:-minioadmin}
|
|
113
|
+
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY:-minioadmin}
|
|
114
|
+
BUCKET_NAME: ${AWS_STORAGE_BUCKET_NAME:-{{projectName}}-media}
|
|
115
|
+
{{/if}}
|
|
116
|
+
{{#if withRedis}}
|
|
117
|
+
|
|
118
|
+
redis:
|
|
119
|
+
image: redis:7-alpine
|
|
120
|
+
restart: unless-stopped
|
|
121
|
+
ports:
|
|
122
|
+
- "6379:6379"
|
|
123
|
+
{{/if}}
|
|
124
|
+
{{#if withCelery}}
|
|
125
|
+
|
|
126
|
+
celery_worker:
|
|
127
|
+
build:
|
|
128
|
+
context: ./backend
|
|
129
|
+
dockerfile: Dockerfile
|
|
130
|
+
command: uv run celery -A config worker --loglevel=info
|
|
131
|
+
restart: unless-stopped
|
|
132
|
+
environment:
|
|
133
|
+
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE:-config.settings.local}
|
|
134
|
+
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
|
|
135
|
+
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379/0}
|
|
136
|
+
{{#if withPostgres}}
|
|
137
|
+
DATABASE_URL: ${DATABASE_URL:-postgres://postgres:postgres@postgres:5432/app}
|
|
138
|
+
{{/if}}
|
|
139
|
+
{{#if withS3}}
|
|
140
|
+
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-minioadmin}
|
|
141
|
+
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-minioadmin}
|
|
142
|
+
AWS_STORAGE_BUCKET_NAME: ${AWS_STORAGE_BUCKET_NAME:-{{projectName}}-media}
|
|
143
|
+
AWS_S3_ENDPOINT_URL: ${AWS_S3_ENDPOINT_URL:-http://minio:9000}
|
|
144
|
+
AWS_S3_REGION_NAME: ${AWS_S3_REGION_NAME:-us-east-1}
|
|
145
|
+
{{/if}}
|
|
146
|
+
depends_on:
|
|
147
|
+
- redis
|
|
148
|
+
- backend
|
|
149
|
+
volumes:
|
|
150
|
+
- ./backend:/app
|
|
151
|
+
- /app/.venv
|
|
152
|
+
|
|
153
|
+
flower:
|
|
154
|
+
image: mher/flower:2.0
|
|
155
|
+
restart: unless-stopped
|
|
156
|
+
environment:
|
|
157
|
+
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
|
|
158
|
+
ports:
|
|
159
|
+
- "5555:5555"
|
|
160
|
+
depends_on:
|
|
161
|
+
- redis
|
|
162
|
+
- celery_worker
|
|
163
|
+
{{/if}}
|
|
164
|
+
{{#if withCeleryBeat}}
|
|
165
|
+
|
|
166
|
+
celery_beat:
|
|
167
|
+
build:
|
|
168
|
+
context: ./backend
|
|
169
|
+
dockerfile: Dockerfile
|
|
170
|
+
command: uv run celery -A config beat --loglevel=info
|
|
171
|
+
restart: unless-stopped
|
|
172
|
+
environment:
|
|
173
|
+
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE:-config.settings.local}
|
|
174
|
+
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
|
|
175
|
+
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379/0}
|
|
176
|
+
depends_on:
|
|
177
|
+
- redis
|
|
178
|
+
- celery_worker
|
|
179
|
+
volumes:
|
|
180
|
+
- ./backend:/app
|
|
181
|
+
- /app/.venv
|
|
182
|
+
{{/if}}
|
|
183
|
+
{{#if withPostgres}}
|
|
184
|
+
|
|
185
|
+
volumes:
|
|
186
|
+
postgres_data:
|
|
187
|
+
{{#if withS3}}
|
|
188
|
+
minio_data:
|
|
189
|
+
{{/if}}
|
|
190
|
+
{{else}}
|
|
191
|
+
{{#if withS3}}
|
|
192
|
+
|
|
193
|
+
volumes:
|
|
194
|
+
minio_data:
|
|
195
|
+
{{/if}}
|
|
196
|
+
{{/if}}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Command reference
|
|
2
|
+
|
|
3
|
+
!!! info "Auto-generated"
|
|
4
|
+
This page is generated from the **live `dude` command catalog** every time you
|
|
5
|
+
run `dude docs`, so it always matches your project's actual commands —
|
|
6
|
+
including the choices made at `dude init` (database, Celery, IaC…) and any
|
|
7
|
+
project-local commands under `.dude/commands/`.
|
|
8
|
+
|
|
9
|
+
You're seeing this placeholder because the docs haven't been served yet. Run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
dude docs
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
and this page will be replaced with the full reference. You can also print it
|
|
16
|
+
yourself at any time:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
dude help --format md # this page, as Markdown
|
|
20
|
+
dude help --format json # the same catalog as JSON (for tooling / LLMs)
|
|
21
|
+
```
|