layout | title | order | repo |
---|---|---|---|
page |
Docker |
3 |
docker |
Create Dockerfile
in your poject root with the following content:
FROM frameworkwtf/docker
COPY . /var/www
Build and run it, that's all.
PS: It's already done in wtf/skeleton
PHP_OPCACHE_ENABLE
- Enable strict OPcache mode, default:0
. Speed up appAPP_ENV
- Application environment, default:dev
. Dev environment provides a lot of debug information and other goodies for devsAPP_RELEASE
- Application release for Sentry releases, default:local
. Should be configured automatically with CIAPP_HOST
- base app host, used in [REST module]({{ site.baseurl }}/rest), default:localhost
. Should be changed on prod env to your own app hostAPP_SECRET
- secret key, used in [REST module]({{ site.baseurl }}/rest), default:qwerty
. Should be changed on prod env to your own secret key
- Swagger builder swagger-php - If your project has swagger-php installed, it will be runned automatically on container start
- Phinx migrations and seed phinx - If your project has phinx installed, migrations will be runned on container start. IF your APP_ENV env var IS NOT "prod", seeds will be runned after migrations
- Console - If your project contains
app/public/console.php
file, you can simply run it withconsole
from any part of the system. Very helpful when you want to add some cron scrits or run it viadocker exec
. Doesn't matter which console library you use - cron - manual
- nginx
- php-fpm