shredbx logo
shredbx shredbx shredbx shredbx Personal
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
AClaude
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
Andrei Solovev
Knowledge
Search knowledge... ⌘K
Knowledge · Guidelines · architecture

Infra Service Deployment

Deploy shared infrastructure services (postgres, redis) to a server as independent Dokploy apps

Andrei Solovev

Metadata

architecture

Procedures

Showing 3 of 4

  1. 1 Generate per-service compose artifacts from YAML
    sbx infra generate reads server YAML and emits:
      infrastructure/docker/{server}/{env}/{service}/docker-compose.yml
      infrastructure/docker/{server}/{env}/{service}/.env.example
    One file per service. .env.example contains op:// refs only (safe to commit).
    sbx infra generate --server contabo-singapore --env staging
    # Output:
    #   infrastructure/docker/contabo-singapore/staging/postgres/docker-compose.yml
    #   infrastructure/docker/contabo-singapore/staging/postgres/.env.example
    #   infrastructure/docker/contabo-singapore/staging/redis/docker-compose.yml
    #   infrastructure/docker/contabo-singapore/staging/redis/.env.example
    
    git add infrastructure/docker/contabo-singapore/staging/
    git commit -m "chore(infra): regenerate staging compose artifacts"
    git push
  2. 2 Register services as Dokploy apps (idempotent)
    sbx server bootstrap --step applications creates Dokploy compose services
    from server.yml applications[]. Safe to re-run — existing apps return "exists".
    Uses sbx.contabo-infra SA token to resolve the Dokploy API key.
    sbx server bootstrap contabo-singapore \
      --project infrastructure \
      --env staging \
      --step applications
    # Creates in Dokploy:
    #   project: infrastructure
    #     app: postgres-staging (compose-from-git)
    #     app: redis-staging    (compose-from-git)
  3. 3 Deploy each service independently
    sbx deploy resolves op:// refs locally, pushes plain env to Dokploy,
    triggers compose rebuild. Each service deploys independently.
    Use --skip-bump for infrastructure services (no version bump needed).
    sbx deploy postgres-staging --env staging --skip-bump
    sbx deploy redis-staging    --env staging --skip-bump
    # Each triggers independently — redeploying postgres does not restart redis
shredbx logo shredbx shredbx shredbx shredbx Andrei Solovev

Solution Architect & Lead Software Engineer

ExperiencePortfolioResearch & ExperimentsEducationCertificationSkills
GitHub ↗LinkedIn ↗Email ↗
AVAILABLE FOR NEW PROJECTS
// MY LATEST BEATS
Hobby & Interests

Lab

  • The Lab
  • Framework
  • Components
  • Packages
  • Games
  • Process (SDLC)
  • Knowledge
  • Blog

Andrei

  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
  • Lifestyle

Team

  • Team
  • Andrei
  • Claude

Legal

  • Privacy
  • Terms
  • Cookies
© 2026 shredbx.com. All rights reserved. — Andrei Solovev |