thebrubaker / laravel-visor
一个简单易用的Docker运行器,用于启动新的Laravel应用程序。
v1.0.0-alpha.2
2020-09-26 16:57 UTC
This package is auto-updated.
Last update: 2024-09-23 08:33:33 UTC
README
Visor是一个快速简单的方法,在Mac OS上使用Docker启动本地Laravel项目。
使用composer全局安装Visor
composer global require thebrubaker/laravel-visor:dev-main
要使用visor启动新的Laravel应用程序,只需运行visor up
提示:如果您已经熟悉Docker或Docker Compose,这个工具可能只是为了方便。
Visor命令
visor up # spin up application visor down # spin down application visor migrate # run migrations visor tinker # jump into your php container with a bash shell visor compose ...args # run docker-compose commands
要求
此工具需要Docker并在Mac OS上运行。如果您想安装Linux的二进制文件,可以要求thebrubaker/laravel-visor:dev-linux
Visor Up
👉 running composer install...
👉 spinning up services...
👉 running migrations...
💪 run `visor down` to spin down your application and services
💪 run `visor tinker` to jump into a php container
👌 Applicaton available at https://:8080
👌 Database available at mysql://root:secret@127.0.0.1:3306/laravel_visor
Visor Down
👉 spinning down services...
Visor Init
It looks like this is your first time running Visor. Proceed with visor init? (Y/n)
👌 Docker is installed
👌 Created .visor directory and added to .gitignore
👉 downloading containers for php 7.4, redis 4.0 and mysql 5.7...
👌 Visor init success!
Visor错误
💥 Docker is not installed on this machine
Visor requires Docker to continue. Have you installed Docker on your machine?
💥 Unable to acquire DB_PORT=3306 from your .env file.
Visor exposes a mysql database on the port listed in your .env file. Please update DB_PORT to one available on your machine and try again.
💥 A docker-compose.yaml file already exists for this project.
Visor is a simple wrapper for docker-compose. Do you want us to backup your docker-compose config and replace it with Visor's config?
💥 Unable to access your application at https://:8080
Visor attempted to spin up your application on port 8080. Was this port already taken?
💥 Unable to access your database at mysql://root:secret@127.0.0.1:3306/laravel_visor
Visor attempted to spin up your database on port 3306. Was this port already taken?
Visor构建
任务
- 构建Docker镜像
- 上传Docker镜像
Visor部署
任务
- 带有标签构建Docker镜像
- 带有标签上传Docker镜像
- 触发Cloud Run更新
目标
- 从头开始运行本地Laravel应用程序
- 设置Google Cloud Run(免费层)
- 部署到Google Cloud Run
- 通过ssh进入生产服务器
visor cloud init
visor cloud build
visor cloud deploy