Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.97 KB

docker.md

File metadata and controls

45 lines (32 loc) · 1.97 KB
layout title order repo
page
Docker
3
docker

How to use

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

Configuration (ENV vars)

  • PHP_OPCACHE_ENABLE - Enable strict OPcache mode, default: 0. Speed up app
  • APP_ENV - Application environment, default: dev. Dev environment provides a lot of debug information and other goodies for devs
  • APP_RELEASE - Application release for Sentry releases, default: local. Should be configured automatically with CI
  • APP_HOST - base app host, used in [REST module]({{ site.baseurl }}/rest), default: localhost. Should be changed on prod env to your own app host
  • APP_SECRET - secret key, used in [REST module]({{ site.baseurl }}/rest), default: qwerty. Should be changed on prod env to your own secret key

Integrated tools

  1. Swagger builder swagger-php - If your project has swagger-php installed, it will be runned automatically on container start
  2. 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
  3. Console - If your project contains app/public/console.php file, you can simply run it with console from any part of the system. Very helpful when you want to add some cron scrits or run it via docker exec. Doesn't matter which console library you use
  4. cron - manual
  5. nginx
  6. php-fpm