{"id":110,"date":"2025-10-08T08:52:52","date_gmt":"2025-10-08T08:52:52","guid":{"rendered":"https:\/\/docs.pedagotchi.de\/?post_type=docs&#038;p=110"},"modified":"2025-10-08T09:00:28","modified_gmt":"2025-10-08T09:00:28","password":"","slug":"git","status":"publish","type":"docs","link":"https:\/\/docs.pedagotchi.de\/index.php\/docs\/git\/","title":{"rendered":"Git"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Zwei Bitbucket\u2011Repos (App vs. API) mit klarer Trennung von Frontend und Backend. Versionierte Schnittstellen und saubere Geheimnis\u2011Verwaltung halten die Zusammenarbeit stabil und nachvollziehbar.<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>App (Frontend, Expo\/React Native)<\/strong>\n<ul class=\"wp-block-list\">\n<li>URL:\u00a0<a class=\"\" href=\"https:\/\/bitbucket.org\/99grad\/app.pedagotchi\/src\/master\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/bitbucket.org\/99grad\/app.pedagotchi\/src\/master\/<\/a><\/li>\n\n\n\n<li>Zweck: Mobile App Code (Expo Router, Tamagui, MobX, Context\u2011Library Integration).<\/li>\n\n\n\n<li>Standard\u2011Branch: aktuell \u201emaster\u201c.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>API\/Backend (Directus\/Server)<\/strong>\n<ul class=\"wp-block-list\">\n<li>URL:\u00a0<a class=\"\" href=\"https:\/\/bitbucket.org\/99grad\/api.pedagotchi.de\/src\/main\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/bitbucket.org\/99grad\/api.pedagotchi.de\/src\/main\/<\/a><\/li>\n\n\n\n<li>Zweck: Directus\u2011Konfiguration, Server\u2011Infra\/Deploy\u2011Artefakte.<\/li>\n\n\n\n<li>Standard\u2011Branch: \u201emain\u201c.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Continuous Deployment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Die Pipeline f\u00fcr <code>api.pedagotchi.de<\/code> baut auf einem Ubuntu-Container, richtet zur Laufzeit SSH\/Git ein, authentifiziert sich per Pipeline-Secret, und pusht den\u00a0<code>main<\/code>-Branch direkt in Dokku auf Hetzner. Dokku \u00fcbernimmt Build\/Deploy der API.<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Repository<\/strong>:\u00a0<code>api.pedagotchi.de<\/code>\u00a0(Branch\u00a0<code>main<\/code>)<\/li>\n\n\n\n<li><strong>Ziel<\/strong>: Deployment der Directus\/API auf dem Server via Dokku (<code>dokku@api.pedagotchi.de:pedagotchi<\/code>)<\/li>\n\n\n\n<li><strong>Pipeline-Datei<\/strong>:\u00a0<code>bitbucket-pipelines.yml<\/code>\u00a0(Konfiguration \u00e4hnlich zum Snippet unten)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Pipeline-Snippet (Referenz)<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>image: ubuntu:latest\n\npipelines:\n  branches:\n    main:\n      - step:\n          name: \"Setup Environment and Test Variables\"\n          deployment: production\n          script:\n            - set -e\n            - apt-get update\n            - apt-get install -y git ssh\n            - echo \"Starting Deployment\"\n            - mkdir -p ~\/.ssh\n            - echo \"$SSH_PRIVATE_KEY\" | base64 -d > ~\/.ssh\/id_rsa\n            - chmod 600 ~\/.ssh\/id_rsa\n            - eval $(ssh-agent -s)\n            - ssh-add ~\/.ssh\/id_rsa\n            - ssh-keyscan -H api.pedagotchi.de >> ~\/.ssh\/known_hosts\n            - git remote add dokku dokku@api.pedagotchi.de:pedagotchi\n            - git push dokku main:master<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zwei Bitbucket\u2011Repos (App vs. API) mit klarer Trennung von Frontend und Backend. Versionierte Schnittstellen und saubere Geheimnis\u2011Verwaltung halten die Zusammenarbeit stabil und nachvollziehbar. Continuous Deployment Die Pipeline f\u00fcr api.pedagotchi.de baut auf einem Ubuntu-Container, richtet zur Laufzeit SSH\/Git ein, authentifiziert sich per Pipeline-Secret, und pusht den\u00a0main-Branch direkt in Dokku auf Hetzner. Dokku \u00fcbernimmt Build\/Deploy der API. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[3],"doc_tag":[],"class_list":["post-110","docs","type-docs","status-publish","hentry","doc_category-systemueberblick"],"year_month":"2026-05","word_count":233,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"jon","author_nicename":"jon","author_url":"https:\/\/docs.pedagotchi.de\/index.php\/author\/jon\/"},"doc_category_info":[{"term_name":"System\u00fcberblick","term_url":"https:\/\/docs.pedagotchi.de\/index.php\/docs-category\/systemueberblick\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/docs\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/comments?post=110"}],"version-history":[{"count":7,"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/docs\/110\/revisions"}],"predecessor-version":[{"id":120,"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/docs\/110\/revisions\/120"}],"wp:attachment":[{"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/media?parent=110"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/doc_category?post=110"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.pedagotchi.de\/index.php\/wp-json\/wp\/v2\/doc_tag?post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}