Files
telegram-bot-for-manipulate…/drone.yaml

41 lines
901 B
YAML
Raw Normal View History

2025-07-27 22:17:28 +03:00
kind: pipeline
type: docker
2025-09-25 22:01:45 +03:00
name: first_run
clone:
disable: true
2025-07-27 22:17:28 +03:00
steps:
2025-09-25 22:01:45 +03:00
- name: clone
image: alpine/git
2025-07-27 22:17:28 +03:00
commands:
2025-09-25 22:01:45 +03:00
- git clone https://git.ronis-0505.ru/ronis_0505/telegram-bot-for-manipulate-orders.git .
2025-07-27 22:17:28 +03:00
- name: build
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker build -t myapp:${DRONE_COMMIT_SHA} .
- name: deploy
2025-09-25 23:18:48 +03:00
image: docker
volumes:
- name: dockersock
path: /var/run/docker.sock
2025-09-25 22:01:45 +03:00
environment:
ENV_CONTENT:
from_secret: DOT_ENV_CONTENT
commands:
- echo "$ENV_CONTENT" > .env
2025-09-25 23:18:48 +03:00
- docker stop myapp || true
- docker rm myapp || true
2025-09-25 23:35:09 +03:00
- docker run -d --name=myapp --network=prod_net -v /srv/prod/telegram_bot/photos:/app/photos/ myapp:${DRONE_COMMIT_SHA}
2025-07-27 22:17:28 +03:00
volumes:
- name: dockersock
host:
path: /var/run/docker.sock