feat: add dynamic versioning and automated deployment with rollback capability
- Implement setuptools-scm for dynamic version management from git tags - Refactor CI/CD into separate build and deploy jobs with artifact sharing - Add versioned releases with timestamp-based deployment directories - Implement health checks and automatic rollback on deployment failure - Extract deployment logic into reusable shell scripts - Add Docker layer caching to speed up builds - Include version info in Django context and build args
This commit is contained in:
parent
46619bd5e1
commit
f20c4f9474
14 changed files with 719 additions and 233 deletions
|
|
@ -4,6 +4,8 @@ import environ
|
|||
import os
|
||||
import logging
|
||||
import sys
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from pkmntrade_club._version import __version__, get_version_info
|
||||
|
||||
# set default values to local dev values
|
||||
env = environ.Env(
|
||||
|
|
@ -84,6 +86,9 @@ CACHE_TIMEOUT = env('CACHE_TIMEOUT')
|
|||
DISABLE_SIGNUPS = env('DISABLE_SIGNUPS')
|
||||
DISABLE_CACHE = env('DISABLE_CACHE')
|
||||
|
||||
VERSION = __version__
|
||||
VERSION_INFO = get_version_info()
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
|
||||
|
||||
|
|
@ -213,6 +218,7 @@ TEMPLATES = [
|
|||
"django.contrib.auth.context_processors.auth",
|
||||
"django.contrib.messages.context_processors.messages",
|
||||
"pkmntrade_club.common.context_processors.cache_settings",
|
||||
"pkmntrade_club.common.context_processors.version_info",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue