Commit 2b48477d by CaIon

修改docker-compose.yml

parent 3b0b139c
version: '3.4' version: '3.4'
services: services:
one-api: new-api:
image: calciumion/new-api:latest image: calciumion/new-api:latest
container_name: one-api container_name: new-api
restart: always restart: always
command: --log-dir /app/logs command: --log-dir /app/logs
ports: ports:
...@@ -12,7 +12,7 @@ services: ...@@ -12,7 +12,7 @@ services:
- ./data:/data - ./data:/data
- ./logs:/app/logs - ./logs:/app/logs
environment: environment:
- SQL_DSN=root:123456@tcp(host.docker.internal:3306)/one-api # 修改此行,或注释掉以使用 SQLite 作为数据库 - SQL_DSN=root:123456@tcp(host.docker.internal:3306)/new-api # 修改此行,或注释掉以使用 SQLite 作为数据库
- REDIS_CONN_STRING=redis://redis - REDIS_CONN_STRING=redis://redis
- SESSION_SECRET=random_string # 修改为随机字符串 - SESSION_SECRET=random_string # 修改为随机字符串
- TZ=Asia/Shanghai - TZ=Asia/Shanghai
......
...@@ -99,6 +99,7 @@ func BatchDeleteChannels(ids []int) error { ...@@ -99,6 +99,7 @@ func BatchDeleteChannels(ids []int) error {
if err != nil { if err != nil {
// 回滚事务 // 回滚事务
tx.Rollback() tx.Rollback()
return err
} }
// 提交事务 // 提交事务
tx.Commit() tx.Commit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment