ipunkt / rancherize-blueprint-php-cli
rancherize php cli blueprint
Installs: 3 780
Dependents: 0
Suggesters: 1
Security: 0
Stars: 1
Watchers: 4
Forks: 1
Open Issues: 1
Type:project
pkg:composer/ipunkt/rancherize-blueprint-php-cli
Requires
- php: ^7.0
- ipunkt/rancherize: ^2.28.3
README
Rancherize blueprint to run a single php command, optionally with cron label to run regularly.
Use
Install
rancherize plugin:install ipunkt/rancherize-blueprint-php-cli:1.0.0
Init
Init local development environment
rancherize init php-cli --dev local
Init push environment to be used with a rancher server
rancherize init php-cli production
Note that as of the time of writing all environments will use the same blueprint
Configuration
Differences from WebserverBlueprint
command: The command that will be executed. The exact command that will be run isphp VALUEGIVENinside/var/cli/appwhere your app is mounted.add-composer: Add a composer.phar to your app directory
The base image version will be resolved in the following steps:
phpset a version, then usephp:$version-alpinedocker.base-imageset, then use this image- nothing of the above, use
php:7.0-alpine
Supported rancherize services
- scheduler
- Cron schedule IMPORTANT: Not the full
cronsyntax is supported. Only theschedulepart is used on the top level of the environment
Example:
{
"default": {
"rancher": {
"account": "accountname",
"in-service": true
},
"docker": {
"account": "accountname",
"repository": "dockername\/reponame",
"version-prefix": "cli_test_",
"base-image": "php:7.0-alpine"
},
"service-name": "ServiceName",
"php": "7.0",
"add-composer": false,
"command": "artisan",
"schedule":{
"hour":"*/2"
},
"scheduler": {
"enable": true
}
},
"environments": {
"local": {
"mount-workdir": true,
"external_links": [],
"environment": {
"EXAMPLE": "value"
}
},
"staging": {
"rancher": {
"stack": "Cli-Test"
},
"scheduler": {
"tags": {
"apps": "true"
}
},
"external_links": [],
"environment": {
"EXAMPLE": "value"
}
}
}
}