Browse Source

feat: 更新 Docker 配置,修正路径以确保前端容器正确运行

pull/68/head
chenjiale 1 month ago
parent
commit
2821b0faa8
  1. 11
      .drone.yml

11
.drone.yml

@ -26,14 +26,19 @@ steps:
volumes: volumes:
- name: dockersock - name: dockersock
path: /var/run/docker.sock path: /var/run/docker.sock
- name: front-conf
path: /opy/alert/alert-front/conf
commands: commands:
- mkdir -p /opt/alert-front/conf - mkdir -p /opy/alert/alert-front/conf
- cp scripts/nginx.conf /opt/alert-front/conf/default.conf - cp scripts/nginx.conf /opy/alert/alert-front/conf/default.conf
- docker stop alert-front || true - docker stop alert-front || true
- docker rm alert-front || true - docker rm alert-front || true
- docker run -d --restart always --name alert-front --network alert-net -p 5000:5000 -v /opt/alert-front/conf:/etc/nginx/conf.d:ro alert-front:latest - docker run -d --restart always --name alert-front --network alert-net -p 5000:5000 -v /opy/alert/alert-front/conf:/etc/nginx/conf.d:ro alert-front:latest
volumes: volumes:
- name: dockersock - name: dockersock
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: front-conf
host:
path: /opy/alert/alert-front/conf

Loading…
Cancel
Save