17 lines
405 B
Python
17 lines
405 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""在服务器上执行数据库迁移"""
|
||
|
|
import subprocess
|
||
|
|
import sys
|
||
|
|
|
||
|
|
cmd = [
|
||
|
|
"python",
|
||
|
|
"C:\\Users\\simon\\.workbuddy\\skills\\jumpserver-ops\\scripts\\jms_ops.py",
|
||
|
|
"exec",
|
||
|
|
"-c",
|
||
|
|
"cd /opt/wecom-it-desk && docker compose exec -T backend alembic current"
|
||
|
|
]
|
||
|
|
|
||
|
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
||
|
|
print(result.stdout)
|
||
|
|
print(result.stderr)
|