mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-14 04:13:41 +08:00
feat: add Docker Compose support (#55)
* docker-compose.yml * Create one-api.service 配置systemd守护进程 * Update docker-compose.yml * Update one-api.service * Update docker-compose.yml * Update docker-compose.yml
This commit is contained in:
13
one-api.service
Normal file
13
one-api.service
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=One API Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=yourusername # 守护进程用户名
|
||||
WorkingDirectory=/path/to/One-API # One API运行路径
|
||||
ExecStart=/path/to/One-API/one-api --port 3000 --log-dir /path/to/One-API/logs # 端口
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user