doku:server:api2.shackspace.de
Dies ist eine alte Version des Dokuments!
api2.shackspace.de
Funktion
- shack API, space API, … auf Ihost2.shackspace.de
Zugriff
- auf host2.shackspace.de:
lxc-attach -n 168146103
Grundinstallation
LXC via ansible
Ansible ausgeführt, weiter manuell:
ufw allow 8081/tcp cd /srv 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 [Unit] Description=shack API After=network-online.target [Service] Type=simple WorkingDirectory=/srv/api.shackspace.de Environment="HOME=/srv/api.shackspace.de" ExecStart=/srv/api.shackspace.de/live-run.sh Restart=always [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable shackapi systemctl start shackapi
doku/server/api2.shackspace.de.1673258041.txt.gz · Zuletzt geändert: 2023-01-09 10:54 von chris