|
|
|
@ -3,16 +3,32 @@ type: docker |
|
|
|
name: build-and-deploy |
|
|
|
name: build-and-deploy |
|
|
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- name: docker-build-image |
|
|
|
- name: build-docker-image |
|
|
|
image: plugins/docker |
|
|
|
image: plugins/docker |
|
|
|
settings: |
|
|
|
settings: |
|
|
|
dockerfile: ./Docker-api |
|
|
|
dockerfile: ./Docker-api |
|
|
|
tags: |
|
|
|
tags: |
|
|
|
|
|
|
|
- ${DRONE_COMMIT_BRANCH} |
|
|
|
|
|
|
|
- ${DRONE_COMMIT} |
|
|
|
- latest |
|
|
|
- latest |
|
|
|
repo: 192.168.0.129:5000/trash-api |
|
|
|
repo: 192.168.0.129:5000/trash-api |
|
|
|
registry: 192.168.0.129:5000 |
|
|
|
registry: 192.168.0.129:5000 |
|
|
|
insecure: true |
|
|
|
insecure: true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: deploy-docker-image |
|
|
|
|
|
|
|
image: appleboy/drone-ssh |
|
|
|
|
|
|
|
settings: |
|
|
|
|
|
|
|
host: 192.168.0.77 |
|
|
|
|
|
|
|
username: |
|
|
|
|
|
|
|
from_secret: username_deploy |
|
|
|
|
|
|
|
password: |
|
|
|
|
|
|
|
from_secret: password_deploy |
|
|
|
|
|
|
|
port: 22 |
|
|
|
|
|
|
|
script: |
|
|
|
|
|
|
|
- docker compose down |
|
|
|
|
|
|
|
- docker image rm trash-api |
|
|
|
|
|
|
|
- docker compose up -d |
|
|
|
|
|
|
|
|
|
|
|
- name: telegram notification |
|
|
|
- name: telegram notification |
|
|
|
image: appleboy/drone-telegram |
|
|
|
image: appleboy/drone-telegram |
|
|
|
settings: |
|
|
|
settings: |
|
|
|
|