Git

Zwei Bitbucket‑Repos (App vs. API) mit klarer Trennung von Frontend und Backend. Versionierte Schnittstellen und saubere Geheimnis‑Verwaltung halten die Zusammenarbeit stabil und nachvollziehbar.

Continuous Deployment #

Die Pipeline für api.pedagotchi.de baut auf einem Ubuntu-Container, richtet zur Laufzeit SSH/Git ein, authentifiziert sich per Pipeline-Secret, und pusht den main-Branch direkt in Dokku auf Hetzner. Dokku übernimmt Build/Deploy der API.

  • Repositoryapi.pedagotchi.de (Branch main)
  • Ziel: Deployment der Directus/API auf dem Server via Dokku (dokku@api.pedagotchi.de:pedagotchi)
  • Pipeline-Dateibitbucket-pipelines.yml (Konfiguration ähnlich zum Snippet unten)

Pipeline-Snippet (Referenz) #

image: ubuntu:latest

pipelines:
  branches:
    main:
      - step:
          name: "Setup Environment and Test Variables"
          deployment: production
          script:
            - set -e
            - apt-get update
            - apt-get install -y git ssh
            - echo "Starting Deployment"
            - mkdir -p ~/.ssh
            - echo "$SSH_PRIVATE_KEY" | base64 -d > ~/.ssh/id_rsa
            - chmod 600 ~/.ssh/id_rsa
            - eval $(ssh-agent -s)
            - ssh-add ~/.ssh/id_rsa
            - ssh-keyscan -H api.pedagotchi.de >> ~/.ssh/known_hosts
            - git remote add dokku dokku@api.pedagotchi.de:pedagotchi
            - git push dokku main:master

What are your feelings

Updated on Oktober 8, 2025