feat: Setup zero-downtime deployments for production and dev branches
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Has been cancelled

- Created separate workflows for production and dev deployments
- Production branch → dk0.dev (port 3000)
- Dev branch → dev.dk0.dev (port 3002)
- Zero-downtime deployment pattern (start new, wait for health, remove old)
- Complete isolation between environments (separate containers, databases, networks)
- Cleaned up unused code and files:
  - Removed unused GhostEditor and ResizableGhostEditor components
  - Removed old/unused workflows and markdown files
  - Fixed docker-compose references
- Upgraded dependencies to latest compatible versions
- Fixed TypeScript errors in editor page
- Updated staging to use dev.dk0.dev domain
This commit is contained in:
2026-01-09 14:19:48 +01:00
parent 5dcc6ae0a6
commit 8c223db2a8
25 changed files with 2206 additions and 3353 deletions

View File

@@ -251,19 +251,13 @@ function EditorPageContent() {
};
// Markdown components for react-markdown with security
const markdownComponents = {
a: ({
node: _node,
...props
}: {
node?: unknown;
href?: string;
children?: React.ReactNode;
}) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const markdownComponents: any = {
a: ({ node: _node, ...props }: { node?: unknown; href?: string; children?: React.ReactNode }) => {
// Validate URLs to prevent javascript: and data: protocols
const href = props.href || "";
const isSafe =
href && !href.startsWith("javascript:") && !href.startsWith("data:");
href && typeof href === 'string' && !href.startsWith("javascript:") && !href.startsWith("data:");
return (
<a
{...props}
@@ -277,18 +271,11 @@ function EditorPageContent() {
/>
);
},
img: ({
node: _node,
...props
}: {
node?: unknown;
src?: string;
alt?: string;
}) => {
img: ({ node: _node, ...props }: { node?: unknown; src?: string; alt?: string }) => {
// Validate image URLs
const src = props.src || "";
const src = props.src;
const isSafe =
src && !src.startsWith("javascript:") && !src.startsWith("data:");
src && typeof src === 'string' && !src.startsWith("javascript:") && !src.startsWith("data:");
// eslint-disable-next-line @next/next/no-img-element
return isSafe ? <img {...props} src={src} alt={props.alt || ""} /> : null;
},