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

46 lines
1.0 KiB
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:
2025-09-26 11:35:54 +03:00
- echo "$ENV_CONTENT" > /srv/prod/telegram_bot/.env
2025-09-26 10:56:52 +03:00
- ls -la | echo
- cat .env
2025-09-25 23:18:48 +03:00
- docker stop myapp || true
- docker rm myapp || true
2025-09-26 11:35:54 +03:00
- 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_SHA}
2025-07-27 22:17:28 +03:00
volumes:
- name: dockersock
host:
path: /var/run/docker.sock