programster / web-app-template
一个用于简化创建网络应用程序的项目模板。
2.0.1
2018-12-30 15:17 UTC
This package is not auto-updated.
Last update: 2024-09-17 17:57:31 UTC
README
这是一个使用 PHP 7.2 和 Ubuntu 18.04 容器构建网站的模板。目前使用的是 slim 框架 版本 3。
使用方法
# Create your project from this template using composer. composer create-project programster/web-app-template my-project-name # Use composer to pull the slim framework cd Docker-Slim3-PHP-WebApp-Template/app composer update # Create the .env file from the template file # be sure to review its settings and fill in appropriately. cp .env.tmpl .env # Build and deploy the docker container. cd ../docker bash build.sh bash deploy.sh
开发部署
在开发应用程序时,您可以使用 dev-deploy.sh
脚本而不是 deploy.sh
脚本。区别在于您的容器将通过卷加载您的文件。因此,您的更改将立即反映出来,您无需不断重新构建和重新部署 Docker 容器。
私有 Docker 仓库
点击 这里 了解如何在不到一分钟内部署您自己的私有 Docker 仓库。
Cron 任务
通过向 docker/crons.conf
文件中添加行,轻松将 cron 任务添加到您的容器中。