2022-04-12 23:15:59 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2022-04-15 03:15:00 +00:00
|
|
|
- name: build-image
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
repo: supanadit/todo
|
|
|
|
username:
|
|
|
|
from_secret: DOCKERUSER
|
|
|
|
password:
|
|
|
|
from_secret: DOCKERPASS
|
2022-04-14 15:08:43 +00:00
|
|
|
|
|
|
|
- name: deploy
|
2022-04-14 15:11:16 +00:00
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host: supanadit.com
|
|
|
|
username: root
|
|
|
|
port: 22
|
2022-04-14 15:08:43 +00:00
|
|
|
key:
|
2022-04-14 21:30:41 +00:00
|
|
|
from_secret: SECRETKEY
|
2022-04-14 15:11:16 +00:00
|
|
|
script:
|
|
|
|
- cd /root/Docker/todo
|
|
|
|
- docker-compose pull
|
2022-04-15 06:38:08 +00:00
|
|
|
- docker-compose down
|
|
|
|
- docker-compose up -d
|
|
|
|
- docker-compose exec todo-app php artisan migrate
|
2022-04-15 06:40:19 +00:00
|
|
|
- docker image prune
|
2022-04-15 06:38:08 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|