Some checks failed
Deploy Waitlist / Deploy to VPS (push) Failing after 2m26s
Adds Django waitlist app to serve the launch-gating endpoints: - GET /training/django-cohort/waitlist → HTML cohort waitlist page - POST /v1/waitlist/django-cohort → JSON signup with attribution Changes: - waitlist/ app: WaitlistSignup model, views, urls, admin, template - config/settings/waitlist.py: minimal prod settings for waitlist-only deploy - config/urls_waitlist.py: slimmed URL conf (waitlist + healthz + admin) - config/urls.py: registers waitlist routes on full project - config/settings/base.py: adds waitlist to INSTALLED_APPS - docker-compose.waitlist.yml: Traefik-labelled deploy for VPS - requirements/waitlist.txt: minimal dependency set for waitlist build - .gitea/workflows/deploy-waitlist.yml: CI deploy job using Docker socket - Dockerfile: parameterise DJANGO_SETTINGS_FOR_COLLECTSTATIC DNS action required after deploy (board): api.usepaperclip.app → 76.13.129.223 (VPS) usepaperclip.app → 76.13.129.223 (VPS) OR Vercel creds for Next.js fix Co-Authored-By: Paperclip <noreply@paperclip.ing>
82 lines
2.3 KiB
Python
82 lines
2.3 KiB
Python
"""Minimal settings for waitlist-only deployment on VPS."""
|
|
import environ
|
|
from pathlib import Path
|
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
|
|
|
env = environ.Env()
|
|
|
|
SECRET_KEY = env("DJANGO_SECRET_KEY")
|
|
DEBUG = False
|
|
ALLOWED_HOSTS = env.list(
|
|
"DJANGO_ALLOWED_HOSTS",
|
|
default=["usepaperclip.app", "api.usepaperclip.app", "localhost"],
|
|
)
|
|
|
|
INSTALLED_APPS = [
|
|
"django.contrib.admin",
|
|
"django.contrib.auth",
|
|
"django.contrib.contenttypes",
|
|
"django.contrib.sessions",
|
|
"django.contrib.messages",
|
|
"django.contrib.staticfiles",
|
|
"waitlist",
|
|
]
|
|
|
|
MIDDLEWARE = [
|
|
"django.middleware.security.SecurityMiddleware",
|
|
"whitenoise.middleware.WhiteNoiseMiddleware",
|
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
|
"django.middleware.common.CommonMiddleware",
|
|
"django.middleware.csrf.CsrfViewMiddleware",
|
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
|
"django.contrib.messages.middleware.MessageMiddleware",
|
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
|
]
|
|
|
|
ROOT_URLCONF = "config.urls_waitlist"
|
|
|
|
TEMPLATES = [
|
|
{
|
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
"DIRS": [BASE_DIR / "templates"],
|
|
"APP_DIRS": True,
|
|
"OPTIONS": {
|
|
"context_processors": [
|
|
"django.template.context_processors.debug",
|
|
"django.template.context_processors.request",
|
|
"django.contrib.auth.context_processors.auth",
|
|
"django.contrib.messages.context_processors.messages",
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
WSGI_APPLICATION = "config.wsgi.application"
|
|
|
|
DATABASES = {
|
|
"default": env.db("DATABASE_URL", default="sqlite:///waitlist.db"),
|
|
}
|
|
|
|
LANGUAGE_CODE = "en-us"
|
|
TIME_ZONE = "UTC"
|
|
USE_I18N = True
|
|
USE_TZ = True
|
|
|
|
STATIC_URL = "/static/"
|
|
STATIC_ROOT = BASE_DIR / "staticfiles"
|
|
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
|
|
|
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
|
|
|
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
|
SESSION_COOKIE_SECURE = True
|
|
CSRF_COOKIE_SECURE = True
|
|
|
|
LOGGING = {
|
|
"version": 1,
|
|
"disable_existing_loggers": False,
|
|
"handlers": {"console": {"class": "logging.StreamHandler"}},
|
|
"root": {"handlers": ["console"], "level": "INFO"},
|
|
}
|