You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
833 B
YAML
40 lines
833 B
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: build
|
|
|
|
steps:
|
|
- name: docker
|
|
image: plugins/docker
|
|
settings:
|
|
registry: docker.cybre.town
|
|
repo: docker.cybre.town/adb/webprog-homework
|
|
tags: "latest"
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: deploy
|
|
|
|
depends_on:
|
|
- build
|
|
|
|
steps:
|
|
- name: pull and deploy
|
|
image: appleboy/drone-ssh:linux-amd64
|
|
settings:
|
|
host:
|
|
from_secret: ssh_host
|
|
username:
|
|
from_secret: ssh_user_name
|
|
key:
|
|
from_secret: ssh_private_key
|
|
script: |
|
|
cd /media/docker/webprog-homework
|
|
docker compose -f docker-compose.prod.yml -p webprog-homework pull -q
|
|
docker compose -f docker-compose.prod.yml -p webprog-homework up -d
|