jelle-s / quickstart
为我的个人LAMP环境生成dns、apache和数据库
1.0.0
2023-01-19 14:45 UTC
Requires
- php: >=8.1
- doctrine/dbal: ^3.5
- symfony/console: ^6.2
- symfony/filesystem: ^6.2
- symfony/process: ^6.2
- symfony/validator: ^6.2
This package is auto-updated.
Last update: 2024-09-19 18:51:24 UTC
README
该仓库包含快速启动命令,以便通过单个命令使网站的基本功能运行。
安装
composer require jelle-s/quickstart
配置
以下环境变量可以/应该配置:
QUICKSTART_WEBSITES_DIR
:您的网站/项目所在的目录,默认为getenv('HOME') . '/websites'
QUICKSTART_DATABASE_USER
:用于创建其他数据库和用户的数据库用户,默认为 'root'QUICKSTART_DATABASE_PASSWORD
:上述配置用户的数据库密码,默认为 ''QUICKSTART_DATABASE_HOST
:数据库主机,默认为 'localhost'QUICKSTART_DATABASE_DRIVER
:要使用的数据库驱动程序,默认为 'pdo_mysql',请参阅 https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html#driver
命令
创建
vendor/bin/quickstart create [--dns --apache --database] myproject.local
Description:
Create a database and dns and apache configuration for a domain.
Usage:
create [options] [--] <domain>
Arguments:
domain
Options:
--dns Add dns configuration to /etc/hosts
--apache Create an apache virtualhost
--database Create a database and database user
数据库和数据库用户是以点 .
替换为 _
的域名。
销毁
vendor/bin/quickstart destroy [--dns --apache --database] myproject.local
Description:
Destroy a database and dns and apache configuration for a domain.
Usage:
destroy [options] [--] <domain>
Arguments:
domain
Options:
--dns Remove dns configuration from /etc/hosts
--apache Remove the apache virtualhost
--database Remove the database and database user
数据库和数据库用户是以点 .
替换为 _
的域名。