-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
79 lines (64 loc) · 1.83 KB
/
Copy pathTaskfile.yml
File metadata and controls
79 lines (64 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
version: '3'
tasks:
install:
desc: Install python dependencies
cmds:
- poetry install
dev:
desc: Start infrastructure, Cloudflare tunnel, and run FastAPI locally
cmds:
- docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d db redis cloudflared
- poetry run uvicorn api.webhook:app --host 0.0.0.0 --port 8000 --reload
poll:
desc: Run the bot locally in polling mode (no webhooks)
cmds:
- docker-compose up -d db redis
- poetry run python bot_polling.py
tunnel:
desc: Start Cloudflare tunnel to expose local port 8000 (Webhook)
cmds:
- cloudflared tunnel --url http://localhost:8000
db:start:
desc: Start only the database and redis containers
cmds:
- docker-compose up -d db redis
db:migrate:
desc: Apply migrations to the database
cmds:
- poetry run alembic upgrade head
db:makemigrations:
desc: Generate a new migration file
cmds:
- poetry run alembic revision --autogenerate -m "{{.CLI_ARGS}}"
docker:up:
desc: Start all services in Docker
cmds:
- docker-compose up -d
docker:down:
desc: Stop and remove all Docker containers
cmds:
- docker-compose down
docker:logs:
desc: View logs from all Docker containers
cmds:
- docker-compose logs -f
broadcast:
desc: Broadcast release updates to all users from locales/current_update.json
cmds:
- poetry run python scripts/broadcast_update.py
lint:
desc: Run Ruff linter and automatically fix issues
cmds:
- poetry run ruff check --fix .
format:
desc: Run Ruff formatter
cmds:
- poetry run ruff format .
test:
desc: Run pytest
cmds:
- poetry run pytest -v
ops:
desc: Launch interactive Operations TUI Console
cmds:
- poetry run python -m ops.main