php¶
PHP scripting language. Uses the riptidepy/php images.
There are variants for PHP 7.1 - 8.4.
Some include the Apache web server (apache variants), others include php-fpm (php-fpm variants) and some only the interpreter (cli variants).
/service/php/base¶
Accessible via Proxy?: no
Runs as the user using Riptide?: yes
Base of all php variants.
Role Requirements¶
Role: mail
The service to use as SMTP server (eg. /service/mailhog). If you don’t have a SMTP service, add the role to this service instead. You will not be able to send emails then.
Suggested Roles¶
Suggested roles: src, php
This service should have access to the source code of the application via the role src.
If this is your main PHP service, add the role php.
You can then use the /command/php/from-service template for commands.
Environment variables¶
Key |
Required? |
Already set? |
Example Value(s) |
Description |
|---|---|---|---|---|
PHP_IDE_CONFIG |
no |
yes, (default: “serverName=riptide-{{ parent().parent().name }}”) |
serverName=riptide-{{ parent().parent().name }} |
Note: XDEBUG_CONFIG that was present here before was removed. The config set there has been moved to the xdebug.ini. Add additional information via PHP INI files.
Config¶
Key |
Target |
Should be replaced? |
Description |
|---|---|---|---|
php_ini |
/etc/php.d/z_riptide.ini |
no, add own files to the php.d directory |
Disables opcache |
msmtprc |
/etc/msmtprc |
no |
SMTP configuration, see “Role Requirements” |
/service/php/base-apache¶
Based on: /service/php/base
Runs as the user using Riptide?: yes, via environment variables APACHE_RUN_USER and APACHE_RUN_GROUP
Accessible via Proxy?: yes
Variant that contains the Apache web server and integrates the PHP CGI module.
Environment variables¶
Key |
Required? |
Already set? |
Example Value(s) |
Description |
|---|---|---|---|---|
APACHE_RUN_USER |
yes |
yes, (default: “#{{ os_user() }}”) |
#{{ os_user() }}, www-data, #1000 |
User to run Apache as |
APACHE_RUN_GROUP |
yes |
yes, (default: “#{{ os_group() }}”) |
#{{ os_group() }}, www-data, #1000 |
Group to run Apache as |
/service/php/X.X/apache¶
Based on: /service/php/base-apache
Variant that contains the Apache web server and integrates the PHP CGI module.
/service/php/X.X/cli¶
Based on: /service/php/base
Variant that only contains the PHP interpreter.
/service/php/X.X/fpm¶
Based on: /service/php/base
Variant that contains PHP-FPM.
Link to entity in repository: <https://github.com/theCapypara/riptide-repo/tree/master/service/php>_