FROM dmstr/phd5
Docker images from phd5-app
can also be used as base images, just by adding modules to the source code.
Visit dmstr/phd5-template
for an example.
phd5-template
repository.See also installation
.env-dist
to .env
and adjust project defaults.project/config/local.env-dist
to project/config/local.env
project/tests/.env-dist
files.Dockerfile
with application defaults, like APP_NAME
and APP_LANGUAGES
.See also configuration
Run
make init
to create the inital development setup
Run inital setup with demo data migrations
make setup
Start stack
make up
or
docker-compose up -d
Open the application in your browser
open http://$DOCKER_HOST_IP:21080
Persistent defaults should be set in Dockerfile
For runtime changes you can create a file under src/local.env
.
edit src/local.env
Enable the host-volume by uncommenting services.php.volumes
in docker-compose.dev.yml
- ./src/local.env:/app/src/local.env
make bash
$ yii migrate/create first
Adjust migration code
See also create migrations from files
Apply schema changes by running the migrations.
$ yii migrate
schmunk42/yii2-giiant
See Code generation
docker cp $(docker-compose ps -q php):/app/composer.json .
Edit run composer require
or edit composer.json
composer update -vv
edit Dockerfile
docker-compose build
:exclamation: Running composer updates in a Docker container might be pretty slow if you are using host-volumes on OS X. See also: issue.
See also Composer update
Make sure you have set a unique COMPOSE_PROJECT_NAME
in project/tests/.env-dist
cd tests
docker-compose up -d
Run tests
docker-compose run --rm php codecept run
See testing
Makefile
supportCopy Makefile
and Makefile.base
from phd5.
REGISTRY_HOST
See also CI
Enable Travis build https://travis-ci.org/profile/schmunk42
GitHub Services > Travis https://github.com/schmunk42/planck/settings/installations
DockerHub setup
Set ENV settings
REGISTRY_PASS
REGISTRY_USER
DEPLOY_TOKEN
curl -X POST \
-F token=${GITLAB_PROJECT_TOKEN}
-F "ref=master"
-F "variables[TRIGGER_STACK_DIR]=demos/${TRAVIS_REPO_SLUG}"
https://{$GITLAB_HOSTNAME}/api/v3/projects/${GITLAB_PROJECT_ID}/trigger/builds
See also Environments
vendor
Help us to improve the documentation, fork this page.