Some checks failed
Deploy Max Bot Test / deploy (push) Failing after 3s
- Slim 4 PSR-15 webhook, PHP-DI 7, Symfony Console 8 - 13 update handlers, 30+ command scenarios, all 7 button types - Composer pulls pkirillw/max-bot-api-php from GitHub vcs - Multi-stage Dockerfile (php-fpm 8.4-alpine) + nginx - docker-compose.yml targets server (npm_default external) - docker-compose.override.yml for local dev (gitignored) - .gitea/workflows/deploy.yml mirrors ghost-blog-bot pattern Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
64 lines
1.4 KiB
Makefile
64 lines
1.4 KiB
Makefile
SHELL := /bin/bash
|
|
COMPOSE := docker compose
|
|
PHP := $(COMPOSE) exec app php
|
|
COMPOSER := $(COMPOSE) run --rm app composer
|
|
|
|
.PHONY: help up down build install composer update subscribe unsubscribe selftest logs ps test clean
|
|
|
|
help:
|
|
@echo "Bot commands:"
|
|
@echo " make build — build docker images"
|
|
@echo " make up — start nginx + php-fpm"
|
|
@echo " make down — stop containers"
|
|
@echo " make install — composer install (first time)"
|
|
@echo " make update — composer update"
|
|
@echo " make subscribe — register webhook with MAX (uses WEBHOOK_URL)"
|
|
@echo " make unsubscribe — remove webhook"
|
|
@echo " make selftest — run smoke tests across all endpoint groups"
|
|
@echo " make bot-info — print BotInfo JSON"
|
|
@echo " make logs — tail app + nginx logs"
|
|
@echo " make test — run PHPUnit"
|
|
|
|
build:
|
|
$(COMPOSE) build
|
|
|
|
up:
|
|
$(COMPOSE) up -d
|
|
|
|
down:
|
|
$(COMPOSE) down
|
|
|
|
install:
|
|
$(COMPOSE) run --rm app composer install
|
|
|
|
composer:
|
|
$(COMPOSER) $(CMD)
|
|
|
|
update:
|
|
$(COMPOSE) run --rm app composer update
|
|
|
|
subscribe:
|
|
$(PHP) bin/console webhook:subscribe
|
|
|
|
unsubscribe:
|
|
$(PHP) bin/console webhook:unsubscribe
|
|
|
|
selftest:
|
|
$(PHP) bin/console selftest
|
|
|
|
bot-info:
|
|
$(PHP) bin/console bot:info
|
|
|
|
ps:
|
|
$(COMPOSE) ps
|
|
|
|
logs:
|
|
$(COMPOSE) logs -f app nginx
|
|
|
|
test:
|
|
$(COMPOSE) run --rm app vendor/bin/phpunit
|
|
|
|
clean:
|
|
$(COMPOSE) down -v
|
|
rm -rf vendor
|