Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/translation-demo-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ jobs:
printf 'FISHJAM_ID=%s\nFISHJAM_MANAGEMENT_TOKEN=%s\nGOOGLE_API_KEY=%s\n' \
"$FISHJAM_ID" "$FISHJAM_MANAGEMENT_TOKEN" "$GOOGLE_API_KEY" > .env
uv sync
systemctl --user restart translator
install -m 644 deploy/translator.service /etc/systemd/system/translator.service
systemctl daemon-reload
systemctl enable translator
systemctl restart translator
Comment thread
Karolk99 marked this conversation as resolved.
env:
SERVICE_DIR: ${{ secrets.TRANSLATOR_SERVICE_DIR }}
FISHJAM_ID: ${{ secrets.TRANSLATION_FISHJAM_ID }}
Expand Down
17 changes: 17 additions & 0 deletions translation-demo/service/deploy/translator.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Installed to /etc/systemd/system/translator.service by
# .github/workflows/translation-demo-deploy.yml. A system unit (not a
# `systemctl --user` one) so the service survives SSH logouts and reboots.
[Unit]
Description=MoQ live translation service
After=network-online.target
Wants=network-online.target

[Service]
User=root
WorkingDirectory=/home/translator-service
ExecStart=/root/.local/bin/uv run --env-file .env translator
Comment thread
Karolk99 marked this conversation as resolved.
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target