Dayuse App Commands by dayuse-labs/skills-portfolio
npx skills add https://github.com/dayuse-labs/skills-portfolio --skill 'Dayuse App Commands'Dayuse.com 项目的所有本地开发命令均使用 Python Invoke(前缀为 inv),并且必须通过 pipenv 从项目根目录运行。
pip install pipenv)/Users/fabiendauvergne/PhpstormProjects/dayuse-com始终在命令前加上 pipenv run 以确保使用正确的 Python 环境:
pipenv run inv <command>
始终从项目根目录运行:/Users/fabiendauvergne/PhpstormProjects/dayuse-com
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Docker 容器必须正在运行才能执行大多数命令。如果不确定,请先运行 pipenv run inv up。
切勿直接运行 inv 而不使用 pipenv run —— 这可能会使用错误的 Python/invoke 版本。
| 操作 | 命令 |
|---|---|
| 启动所有服务 | pipenv run inv start |
| 仅启动容器 | pipenv run inv up |
| 停止容器 | pipenv run inv stop |
| 运行 PHP 测试 | pipenv run inv phpunit |
| 运行特定 PHP 测试 | pipenv run inv phpunit --filter-tests=MyTest |
| PHPStan 分析 | pipenv run inv phpstan |
| 修复代码风格 | pipenv run inv cs-fix |
| 前端测试 | pipenv run inv front-web-test |
| 数据库迁移 | pipenv run inv migrate |
# 完整设置:构建 + 启动 + 安装依赖 + 迁移数据库
pipenv run inv start
# 构建 Docker 镜像 + 启动容器(不安装/迁移)
pipenv run inv up
# 仅构建 Docker 镜像
pipenv run inv build
# 停止所有容器
pipenv run inv stop
# 销毁所有内容(容器、卷、网络)—— 破坏性操作
pipenv run inv destroy
# 列出容器状态
pipenv run inv ps
# 显示容器日志
pipenv run inv logs
# 在 builder 容器中打开 bash shell
pipenv run inv builder
# 启动工作进程容器
pipenv run inv start-workers
# 停止工作进程容器
pipenv run inv stop-workers
# 完整测试套件(创建测试数据库 + 数据夹具 + PHPUnit)
pipenv run inv tests
# 仅运行 PHPUnit(假设测试数据库已存在)
pipenv run inv phpunit
# 通过过滤器运行特定测试
pipenv run inv phpunit --filter-tests=MyTestClass
pipenv run inv phpunit --filter-tests=testMethodName
# 运行并生成代码覆盖率报告
pipenv run inv phpunit --coverage
# 创建/重置测试数据库并加载数据夹具
pipenv run inv create-test-env
# 导入特定数据夹具
pipenv run inv import-fixtures
# PHPStan 静态分析(级别 10)
pipenv run inv phpstan
# PHP-CS-Fixer —— 自动修复代码风格
pipenv run inv cs-fix
# PHP-CS-Fixer —— 仅检查(试运行,用于 CI)
pipenv run inv cs-fix --dry-run
# PHP 语法 + YAML + Twig 代码检查
pipenv run inv lint
# 根据实体验证 Doctrine 模式
pipenv run inv schema-validate
# Jest 测试
pipenv run inv front-web-test
# ESLint 检查
pipenv run inv front-web-lint
# TypeScript 类型检查
pipenv run inv front-web-type
# Prettier 格式化检查
pipenv run inv front-web-prettier
# 单元测试(替代方案)
pipenv run inv tests-unit-front
# 重置前端 API 缓存
pipenv run inv reset-frontend-api
# 单元测试
pipenv run inv test-app
# ESLint 检查
pipenv run inv lint-app
# TypeScript 合规性检查
pipenv run inv typing-app
# 格式检查
pipenv run inv format-app
# 检查 XCode plist 文件
pipenv run inv check-plist
# 运行待处理的迁移
pipenv run inv migrate
# 生成新的迁移文件
pipenv run inv make-migration
# 将 SQL 转储文件加载到 dayuse_dev 数据库
pipenv run inv mysql-load-dump
# 对当前 MySQL 卷进行快照(供以后快速恢复)
pipenv run inv volume-mysql-snapshot
# 从快照恢复 MySQL 卷
pipenv run inv volume-mysql-snapshot-restore
# 重建酒店索引(完整)
pipenv run inv es-build-hotel
# 为特定国家重建酒店索引
pipenv run inv es-build-hotel --country=FR
# 重建 POI 索引
pipenv run inv es-build-poi
# 重建账单索引
pipenv run inv es-build-billing
# 重建订单索引
pipenv run inv es-build-order
# 设置 ES 快照
pipenv run inv es-setup-snapshot
# 重置 ES 快照
pipenv run inv es-reset-snapshot
# 从快照恢复酒店索引
pipenv run inv es-restore-hotel-snapshot
# 从快照恢复 POI 索引
pipenv run inv es-restore-poi-snapshot
# 从 Loco 下载翻译(前端 + 后端)
pipenv run inv loco-download
# 下载翻译、提交并推送(用于发布)
pipenv run inv finalize-release
# 清除 Symfony 缓存
pipenv run inv cache-clear
# 清除 dev.log
pipenv run inv log-clear
# 安装所有依赖项(composer + yarn)
pipenv run inv install
# 仅安装 composer 依赖项
pipenv run inv composer-install
# 生成 SSL 证书
pipenv run inv generate-certificates
# 显示帮助信息及本地 URL
pipenv run inv help
在 CI 模式下运行时,首先设置 CI 标志:
pipenv run inv ci
CI 运行以下检查(必须全部通过):
pipenv run inv phpunit —— PHP 单元测试pipenv run inv phpstan —— 静态分析pipenv run inv cs-fix --dry-run —— 代码风格检查pipenv run inv lint —— 语法检查pipenv run inv schema-validate —— Doctrine 模式验证pipenv run inv front-web-lint —— 前端 ESLint 检查pipenv run inv front-web-type —— 前端 TypeScript 检查pipenv run inv front-web-prettier —— 前端格式化检查容器运行后 (pipenv run inv up):
| 服务 | URL |
|---|---|
| API | https://api.dayuse.test/ |
| 后台管理 | https://bo.dayuse.test/ |
| 合作伙伴外联网 | https://partners.dayuse.test/ |
| 搜索 API | https://api-search.dayuse.test/ |
| 重定向服务 | https://r.dayuse.test/ |
| RabbitMQ | https://rabbitmq.dayuse.test/ |
| Mailcatcher | https://mail.dayuse.test/ |
症状:inv up 失败或容器崩溃 解决方案:
pipenv run inv destroy
pipenv run inv start
症状:PHPUnit 因模式错误而失败 解决方案:
pipenv run inv create-test-env
pipenv run inv phpunit
症状:pipenv: command not found 或导入错误 解决方案:
pip install pipenv
cd /Users/fabiendauvergne/PhpstormProjects/dayuse-com
pipenv install
症状:搜索无结果 解决方案:
pipenv run inv es-build-hotel
pipenv run inv es-build-poi
每周安装量
0
代码仓库
GitHub 星标数
2
首次出现
1970年1月1日
安全审计
All local development commands for the Dayuse.com project use Python Invoke (prefixed with inv) and must be run through pipenv from the project root.
pip install pipenv)/Users/fabiendauvergne/PhpstormProjects/dayuse-comAlways prefix commands withpipenv run to ensure the correct Python environment:
pipenv run inv <command>
Always run from the project root : /Users/fabiendauvergne/PhpstormProjects/dayuse-com
Docker containers must be running for most commands. If unsure, run pipenv run inv up first.
Never runinv directly without pipenv run — it may use the wrong Python/invoke version.
| Action | Command |
|---|---|
| Start everything | pipenv run inv start |
| Start containers only | pipenv run inv up |
| Stop containers | pipenv run inv stop |
| Run PHP tests | pipenv run inv phpunit |
| Run specific PHP test | pipenv run inv phpunit --filter-tests=MyTest |
| PHPStan analysis | pipenv run inv phpstan |
# Full setup: build + start + install deps + migrate DB
pipenv run inv start
# Build Docker images + start containers (no install/migrate)
pipenv run inv up
# Build Docker images only
pipenv run inv build
# Stop all containers
pipenv run inv stop
# Destroy everything (containers, volumes, networks) — DESTRUCTIVE
pipenv run inv destroy
# List container status
pipenv run inv ps
# Show container logs
pipenv run inv logs
# Open bash shell in builder container
pipenv run inv builder
# Start worker containers
pipenv run inv start-workers
# Stop worker containers
pipenv run inv stop-workers
# Full test suite (creates test DB + fixtures + PHPUnit)
pipenv run inv tests
# Run PHPUnit only (assumes test DB already exists)
pipenv run inv phpunit
# Run specific test(s) by filter
pipenv run inv phpunit --filter-tests=MyTestClass
pipenv run inv phpunit --filter-tests=testMethodName
# Run with code coverage
pipenv run inv phpunit --coverage
# Create/reset test database with fixtures
pipenv run inv create-test-env
# Import specific fixtures
pipenv run inv import-fixtures
# PHPStan static analysis (level 10)
pipenv run inv phpstan
# PHP-CS-Fixer — auto-fix code style
pipenv run inv cs-fix
# PHP-CS-Fixer — check only (dry-run, used in CI)
pipenv run inv cs-fix --dry-run
# PHP syntax + YAML + Twig linting
pipenv run inv lint
# Validate Doctrine schema against entities
pipenv run inv schema-validate
# Jest tests
pipenv run inv front-web-test
# ESLint
pipenv run inv front-web-lint
# TypeScript type check
pipenv run inv front-web-type
# Prettier formatting check
pipenv run inv front-web-prettier
# Unit tests (alternative)
pipenv run inv tests-unit-front
# Reset frontend API cache
pipenv run inv reset-frontend-api
# Unit tests
pipenv run inv test-app
# ESLint
pipenv run inv lint-app
# TypeScript compliance
pipenv run inv typing-app
# Format check
pipenv run inv format-app
# Check XCode plist files
pipenv run inv check-plist
# Run pending migrations
pipenv run inv migrate
# Generate a new migration
pipenv run inv make-migration
# Load a SQL dump into dayuse_dev
pipenv run inv mysql-load-dump
# Snapshot current MySQL volume (for fast restore later)
pipenv run inv volume-mysql-snapshot
# Restore MySQL volume from snapshot
pipenv run inv volume-mysql-snapshot-restore
# Rebuild hotel index (full)
pipenv run inv es-build-hotel
# Rebuild hotel index for specific country
pipenv run inv es-build-hotel --country=FR
# Rebuild POI index
pipenv run inv es-build-poi
# Rebuild billing index
pipenv run inv es-build-billing
# Rebuild order index
pipenv run inv es-build-order
# Setup ES snapshot
pipenv run inv es-setup-snapshot
# Reset ES snapshot
pipenv run inv es-reset-snapshot
# Restore hotel index from snapshot
pipenv run inv es-restore-hotel-snapshot
# Restore POI index from snapshot
pipenv run inv es-restore-poi-snapshot
# Download translations from Loco (frontend + backend)
pipenv run inv loco-download
# Download translations, commit, and push (for releases)
pipenv run inv finalize-release
# Clear Symfony cache
pipenv run inv cache-clear
# Clear dev.log
pipenv run inv log-clear
# Install all dependencies (composer + yarn)
pipenv run inv install
# Install composer dependencies only
pipenv run inv composer-install
# Generate SSL certificates
pipenv run inv generate-certificates
# Display help with local URLs
pipenv run inv help
When running in CI mode, first set the CI flag:
pipenv run inv ci
CI runs these checks (all must pass):
pipenv run inv phpunit — PHP unit testspipenv run inv phpstan — Static analysispipenv run inv cs-fix --dry-run — Code style checkpipenv run inv lint — Syntax lintingpipenv run inv schema-validate — Doctrine schemapipenv run inv front-web-lint — Frontend ESLintpipenv run inv front-web-type — Frontend TypeScriptpipenv run inv front-web-prettier — Frontend formattingOnce containers are running (pipenv run inv up):
| Service | URL |
|---|---|
| API | https://api.dayuse.test/ |
| Back Office | https://bo.dayuse.test/ |
| Partners Extranet | https://partners.dayuse.test/ |
| Search API | https://api-search.dayuse.test/ |
| Redirects | https://r.dayuse.test/ |
| RabbitMQ | https://rabbitmq.dayuse.test/ |
| Mailcatcher | https://mail.dayuse.test/ |
Symptoms : inv up fails or containers crash Solution :
pipenv run inv destroy
pipenv run inv start
Symptoms : PHPUnit fails with schema errors Solution :
pipenv run inv create-test-env
pipenv run inv phpunit
Symptoms : pipenv: command not found or import errors Solution :
pip install pipenv
cd /Users/fabiendauvergne/PhpstormProjects/dayuse-com
pipenv install
Symptoms : Search returns no results Solution :
pipenv run inv es-build-hotel
pipenv run inv es-build-poi
Weekly Installs
0
Repository
GitHub Stars
2
First Seen
Jan 1, 1970
Security Audits
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
114,200 周安装
| Fix code style | pipenv run inv cs-fix |
| Frontend tests | pipenv run inv front-web-test |
| DB migration | pipenv run inv migrate |