Files
telegram-bot-for-manipulate…/drone.yaml
ronis_0505 d62ebfb125
All checks were successful
continuous-integration/drone/push Build is passing
fix v7
2025-09-26 12:51:01 +03:00

45 lines
1.1 KiB
YAML

kind: pipeline
type: docker
name: first_run
clone:
disable: true
steps:
- name: clone
image: alpine/git
commands:
- git clone https://git.ronis-0505.ru/ronis_0505/telegram-bot-for-manipulate-orders.git .
- name: build
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker build -t myapp:${DRONE_COMMIT_BRANCH} .
- name: deploy
image: docker
volumes:
- name: dockersock
path: /var/run/docker.sock
- name: env
path: /srv/prod/telegram_bot/
environment:
ENV_CONTENT:
from_secret: DOT_ENV_CONTENT
commands:
- echo "$ENV_CONTENT" > /srv/prod/telegram_bot/.env
- docker stop myapp || true
- docker rm myapp || true
- docker run -d --name=myapp --network=prod_net -v /srv/prod/telegram_bot/photos:/app/photos/ -v /srv/prod/telegram_bot/.env:/app/.env:ro myapp:${DRONE_COMMIT_BRANCH}
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: env
host:
path: /srv/prod/telegram_bot/