File size: 640 Bytes
9aab84d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | [Unit]
Description=zai2api - Z.AI to OpenAI API proxy
After=network.target zai-captcha-provider.service
Requires=zai-captcha-provider.service
[Service]
Type=simple
ExecStartPre=-/usr/bin/docker rm -f zai2api
ExecStart=/usr/bin/docker run --rm --name zai2api \
--network host \
-v /opt/zai2api/data:/app/data \
-e PORT=8000 \
-e AUTH_TOKEN=your-api-key \
-e BACKUP_TOKEN=your-zai-jwt-token \
-e CAPTCHA_PROVIDER_URL=http://127.0.0.1:9876 \
-e RETRY_COUNT=2 \
-e LOG_LEVEL=info \
zai2api:latest
ExecStop=/usr/bin/docker stop zai2api
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
|