thek4n.ru/.drone.yml
thek4n e068e8ac2a
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
continuous-integration/drone/promote/production Build is passing
ci: drone config fix
2026-06-03 15:10:58 +03:00

59 lines
1.1 KiB
YAML

kind: pipeline
type: docker
name: docker-compose-deploy
steps:
- name: dockerize
image: plugins/docker
environment:
DOCKER_BUILDKIT: 1
settings:
repo: localhost:8091/thek4n/thek4n.ru
tags:
- latest
- ${DRONE_TAG}
dockerfile: Dockerfile
registry: localhost:8091
insecure: true
build_args:
- APP_VERSION=${DRONE_TAG}
volumes:
- name: docker-socket
path: /var/run/docker.sock
when:
event:
- promote
target:
- production
- development
ref:
- refs/tags/*
- name: deploy-to-production
image: appleboy/drone-ssh
settings:
host:
- 192.168.50.5
username: thek4n
key:
from_secret: ssh_key
port: 22
script:
- |
cd "/home/thek4n/services/thek4n.ru" && \
IMAGE_TAG="${DRONE_TAG}" docker compose up -d
when:
event:
- promote
target:
- production
ref:
- refs/tags/*
depends_on:
- dockerize
volumes:
- name: docker-socket
host:
path: /var/run/docker.sock