Benutzer-Werkzeuge

Webseiten-Werkzeuge


doku:server:api2.shackspace.de

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
doku:server:api2.shackspace.de [2022-09-01 10:08] – angelegt aredoku:server:api2.shackspace.de [2023-01-11 20:59] (aktuell) – [api2.shackspace.de] are
Zeile 1: Zeile 1:
 ====== api2.shackspace.de ======                  ====== api2.shackspace.de ======                 
-{{tag> infrastructure}}+{{tag> infrastructure computing}} 
 + 
 +**Funktion**\\ 
 +  * shack API, space API, ... auf I[[doku:server:host2.shackspace.de|host2.shackspace.de]] 
 +  * https://api.shackspace.de/ 
 + 
 +**Zugriff**\\ 
 +  * auf [[doku:server:host2.shackspace.de]]: ''pct enter 168146103'' 
 ===== Grundinstallation ===== ===== Grundinstallation =====
 LXC via ansible LXC via ansible
Zeile 10: Zeile 18:
 cd /srv cd /srv
 git clone https://github.com/shackspace/api.shackspace.de.git git clone https://github.com/shackspace/api.shackspace.de.git
 +cat <<'EOF' >/srv/api.shackspace.de/live-run.sh
 +#!/bin/bash
 +
 +set -e
 +
 +echo "updating..."
 +git pull
 +
 +echo "building..."
 +go build
 +
 +echo "running..."
 +./api www/space-api.json www/live-auth-token.txt www/live-last-seen.txt :8081
 +EOF
 +
 cat <<'EOF' >/etc/systemd/system/shackapi.service  cat <<'EOF' >/etc/systemd/system/shackapi.service 
 [Unit] [Unit]
Zeile 19: Zeile 42:
 WorkingDirectory=/srv/api.shackspace.de WorkingDirectory=/srv/api.shackspace.de
 Environment="HOME=/srv/api.shackspace.de" Environment="HOME=/srv/api.shackspace.de"
-ExecStart=/srv/api.shackspace.de/run.sh+ExecStart=/srv/api.shackspace.de/live-run.sh
 Restart=always Restart=always
  
doku/server/api2.shackspace.de.1662019714.txt.gz · Zuletzt geändert: 2022-09-01 10:08 von are