This commit is contained in:
@@ -100,13 +100,11 @@ Use Docker with Docker Compose for local development and production deployment,
|
|||||||
### Reasoning
|
### Reasoning
|
||||||
- Docker ensures the application runs identically regardless of the host machine, reducing "works on my machine" issues during handoff.
|
- Docker ensures the application runs identically regardless of the host machine, reducing "works on my machine" issues during handoff.
|
||||||
- Docker is an easier way of getting the full stack operational on a new contributors machine compared to making them do multiple different installs.
|
- Docker is an easier way of getting the full stack operational on a new contributors machine compared to making them do multiple different installs.
|
||||||
- Docker Compose is simple enough for a non-specialist maintainer to understand and operate.
|
|
||||||
- Separate override files (`compose.dev.yaml`, `compose.prod.yaml`, `compose.test.yaml`) allow environment-specific configuration without duplicating the base service definitions.
|
- Separate override files (`compose.dev.yaml`, `compose.prod.yaml`, `compose.test.yaml`) allow environment-specific configuration without duplicating the base service definitions.
|
||||||
- A VPS with Docker is significantly cheaper than a managed hosting service while providing more control.
|
- A VPS with Docker is significantly cheaper than a managed hosting service while providing more control.
|
||||||
|
|
||||||
### Consequences
|
### Consequences
|
||||||
- New maintainers need minimal Docker literacy, but this is a reasonable baseline expectation.
|
- The Makefile wraps common Docker Compose commands to reduce increase ease-of-use.
|
||||||
- The Makefile wraps common Docker Compose commands to reduce the surface area a maintainer needs to know day-to-day.
|
|
||||||
- Data persistence is handled via named Docker volumes.
|
- Data persistence is handled via named Docker volumes.
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -149,6 +147,7 @@ Use PEP8 as the style guide with enforced type hinting. Enforced using 'ruff' an
|
|||||||
### Consequences
|
### Consequences
|
||||||
Linting checks have to integrated into the CI/CD pipeline.
|
Linting checks have to integrated into the CI/CD pipeline.
|
||||||
'Contributing.md' needs to be created to make it clear how to contribute.
|
'Contributing.md' needs to be created to make it clear how to contribute.
|
||||||
|
Linting tools will have to installed.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ INSTALLED_APPS = [
|
|||||||
"django.contrib.messages",
|
"django.contrib.messages",
|
||||||
"django.contrib.staticfiles",
|
"django.contrib.staticfiles",
|
||||||
"django.contrib.admindocs",
|
"django.contrib.admindocs",
|
||||||
"django_browser_reload",
|
|
||||||
"django_watchfiles",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@@ -53,9 +51,13 @@ MIDDLEWARE = [
|
|||||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||||
"django.contrib.messages.middleware.MessageMiddleware",
|
"django.contrib.messages.middleware.MessageMiddleware",
|
||||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||||
"django_browser_reload.middleware.BrowserReloadMiddleware",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if os.getenv("DJANGO_RELOAD", "False") == "True":
|
||||||
|
INSTALLED_APPS.append("django_browser_reload")
|
||||||
|
INSTALLED_APPS.append("django_watchfiles")
|
||||||
|
MIDDLEWARE.append("django_browser_reload.middleware.BrowserReloadMiddleware")
|
||||||
|
|
||||||
ROOT_URLCONF = "website.urls"
|
ROOT_URLCONF = "website.urls"
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
|
|||||||
@@ -15,12 +15,16 @@ Including another URLconf
|
|||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import include, path
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("polls/", include("polls.urls")),
|
path("polls/", include("polls.urls")),
|
||||||
path("admin/doc/", include("django.contrib.admindocs.urls")),
|
path("admin/doc/", include("django.contrib.admindocs.urls")),
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("__reload__/", include("django_browser_reload.urls")),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if os.getenv("DJANGO_RELOAD", "False") == "True":
|
||||||
|
urlpatterns.append(path("__reload__/", include("django_browser_reload.urls")))
|
||||||
|
|||||||
Reference in New Issue
Block a user