Browse Source

refactor: 🛠️ 简化 Docker 容器运行命令,移除多余换行和注释

pull/26/head
chenjiale 1 month ago
parent
commit
b2de4a6b14
  1. 12
      .drone.yml

12
.drone.yml

@ -33,20 +33,10 @@ steps:
- echo "=== RUN STAGE PWD ===" - echo "=== RUN STAGE PWD ==="
- pwd - pwd
- ls -l - ls -l
# 确保 config.py 一定是文件(避免被误识别为目录)
- test -f $(pwd)/config.py || (echo "config.py not found" && exit 1) - test -f $(pwd)/config.py || (echo "config.py not found" && exit 1)
- docker stop alert-python || true - docker stop alert-python || true
- docker rm alert-python || true - docker rm alert-python || true
- docker run -d --restart always --name alert-python --network alert-net -p 8082:8082 -v $(pwd)/config.py:/opt/alert/model-lab/config.py:ro -v $(pwd)/config.py:/app/config.py:ro alert-python:latest
- docker run -d --restart always \
--name alert-python \
--network alert-net \
-p 8082:8082 \
-v $(pwd)/config.py:/opt/alert/model-lab/config.py:ro \
-v $(pwd)/config.py:/app/config.py:ro \
alert-python:latest
volumes: volumes:
- name: dockersock - name: dockersock

Loading…
Cancel
Save