Skip to content

Deployment

Standard deployment

Individual service deployments

# 1. Code aendern
# 2. Rebuilden + Neustarten
sudo docker compose -f /etc/xynap/stack/docker-compose.yml up -d --build <service>

Platform API deploying

# Backend rebuilden
sudo docker compose build platform-api
sudo docker compose up -d platform-api

# Migration ausfuehren (falls noetig)
sudo docker compose exec \
  -e DATABASE_URL="mysql+asyncmy://platform:platform2024@mariadb:3306/xynap_platform" \
  platform-api alembic upgrade head

Platform UI deploy

# Frontend builden (lokal, nicht im Container)
cd /usr/local/xynap/platform/frontend
npm run build

# nginx liest aus dist/ — Container-Restart reicht
sudo docker compose restart platform-ui

Alembic Migrations

# Neue Migration erstellen
cd /usr/local/xynap/platform/backend
# Migration-Datei manuell in alembic/versions/ erstellen

# Migration ausfuehren (im Container)
sudo docker compose exec \
  -e DATABASE_URL="mysql+asyncmy://platform:platform2024@mariadb:3306/xynap_platform" \
  platform-api alembic upgrade head

# Status pruefen
sudo docker compose exec \
  -e DATABASE_URL="..." \
  platform-api alembic current

DATABASE URL

Alembic in the container needs the DB-URL as an environment variable, because thebackend.envis mounted as a volume but not asenv_file.

Remote deployment

Via Telegram

/deploy <service-name>

Via e-mail

An: webmaster@isn-systems.com
Betreff: CMD:DEPLOY+<service-name>

Hosting Routes

Customer domain routines are generated by the Platform API:

# Im platform-api Container (oder via Workflow)
# Generiert /etc/xynap/traefik/conf.d/hosting-routes.yml

Traefik automatically detects changes (File-Provider Watch).

DNS records

# Via domain-ctl (xynap.tech Zone)
/home/admin/domain-ctl/domain-ctl create sub A 46.4.96.105
/home/admin/domain-ctl/domain-ctl list xynap.tech
/home/admin/domain-ctl/domain-ctl delete sub A

# Via Platform API (fuer Kunden-Domains mit Provider-Credentials)
POST /api/v1/domains/{id}/records