Skip to main content

Deployment engine for React SPA frontends — Docker + GHCR + Kubernetes

Project description

frontblok-deploy

Deployment engine for React SPA frontends. Extracts all reusable deployment infrastructure into one Python package.

One package. One pattern. Every frontend.

What it owns

  • Dockerfile — Multi-stage node:20-alpine → nginx:1.25-alpine build
  • nginx.conf — Security-hardened config with parameterized CSP
  • k8s/deployment.yaml — Full Kubernetes manifest with placeholder replacement
  • Deploy engine — The 10-step chain: env → validate → generate files → git sha → docker build → push → namespace → secret → apply → rollout

What each app provides

Each frontend repo's deploy.py is pure config — declaring what makes THIS app different:

#!/usr/bin/env python3
from frontblok_deploy import FrontendDeployer

FrontendDeployer(
    vite_args=[
        "VITE_DATABASE_API_URL",
        "VITE_BUSINESS_LOGIC_API_URL",
        "VITE_GOOGLE_CLIENT_ID",
    ],
    required_vars=[
        "VITE_DATABASE_API_URL",
        "VITE_GOOGLE_CLIENT_ID",
    ],
    csp_sources={
        "script_src": "https://js.stripe.com https://accounts.google.com https://apis.google.com https://cdn.jsdelivr.net",
        "style_src": "https://fonts.googleapis.com https://accounts.google.com https://cdn.jsdelivr.net",
        "font_src": "https://fonts.gstatic.com https://fonts.googleapis.com",
        "frame_src": "https://js.stripe.com https://hooks.stripe.com https://accounts.google.com",
    },
).deploy()

That's it. No Dockerfile, no nginx.conf, no K8s manifest needed in the repo. The package generates them at deploy time.

Install

pip install frontblok-deploy
# or for development
pip install -e /path/to/frontblok-deploy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frontblok_deploy-0.3.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

frontblok_deploy-0.3.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file frontblok_deploy-0.3.1.tar.gz.

File metadata

  • Download URL: frontblok_deploy-0.3.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for frontblok_deploy-0.3.1.tar.gz
Algorithm Hash digest
SHA256 25cd9ea6e5848c20893a9f19c973895c34b3bd576fcec93a33961b7f3352e8d4
MD5 14533ed62709e84e3044d09407a72afa
BLAKE2b-256 a6ad4b79a616c7b13390d1ed463a6201fb73e9816836b8c08c84d1c6ddc0cdcb

See more details on using hashes here.

File details

Details for the file frontblok_deploy-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: frontblok_deploy-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for frontblok_deploy-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e25c9c0fd9f3825b7788621bde469100ed522efdec00b0f8c4132a2cd4e845eb
MD5 8a15d34722e0dffd4de3c34a2f5c617d
BLAKE2b-256 e0d874a82b0fa4ebc4d98d2a365cf3cdae73e248ab14e50dece0ffe7f4676da1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page