forked from RedSpider1/concurrent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
45 lines (39 loc) · 1.06 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
kind: pipeline
name: build
steps:
- name: docker
image: plugins/docker
settings:
username: yasinshaw
password:
from_secret: docker_password
repo: registry.cn-hangzhou.aliyuncs.com/yasinshaw/concurrent
registry: registry.cn-hangzhou.aliyuncs.com
mirror: https://mzayqkhl.mirror.aliyuncs.com
tags: latest
---
kind: pipeline
type: ssh
name: deploy
server:
host: yasinshaw.com
user: root
ssh_key:
from_secret: ssh_key
steps:
- name: pull image
environment:
DOCKER_PASSWORD:
from_secret: docker_password
commands:
- docker login --username=yasinshaw --password=$DOCKER_PASSWORD registry.cn-hangzhou.aliyuncs.com
- docker pull registry.cn-hangzhou.aliyuncs.com/yasinshaw/concurrent:latest
- name: remove old container
failure: ignore
commands:
- docker rm -f -v concurrent
- name: start container
commands:
- docker run -d --name=concurrent --restart=always -p 4000:4000 registry.cn-hangzhou.aliyuncs.com/yasinshaw/concurrent:latest
depends_on:
- build