1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

fix custom php.ini, again

This commit is contained in:
Robin Appelman 2026-02-25 19:29:55 +01:00
commit cead37fae7
4 changed files with 12 additions and 10 deletions

View file

@ -227,7 +227,7 @@ haze [match] edit <path>
haze [match] reload haze [match] reload
``` ```
The php configuration can edit changed with `haze edit /php.ini` The php configuration can edit changed with `haze edit /config/php.ini`
#### Checkout a branch for all local apps #### Checkout a branch for all local apps
@ -273,10 +273,12 @@ proxy to allow using a wildcard domain.
### Setup ### Setup
- Set a DNS record for `*.haze.exmaple.com` and `haze.example.com` pointing to - Set a DNS record for `*.haze.exmaple.com` and `haze.example.com` pointing to
`127.0.0.1` or your development machine if you need to access it from other devices. `127.0.0.1` or your development machine if you need to access it from other
devices.
- Set the `proxy` configuration with your domain and desired listen endpoint. - Set the `proxy` configuration with your domain and desired listen endpoint.
- Set up a service to run `haze proxy` in the background as your own user. A - Set up a service to run `haze proxy` in the background as your own user. A
systemd user service is recommended (see [haze.service](./haze.service) for an example). systemd user service is recommended (see [haze.service](./haze.service) for an
example).
- Configure your reverse proxy of choice to proxy `*.haze.example.com` and - Configure your reverse proxy of choice to proxy `*.haze.example.com` and
`haze.example.com` to the proxy's listen endpoint `haze.example.com` to the proxy's listen endpoint
- (optional) acquire a wildcard ssl certificate for your domain and set your - (optional) acquire a wildcard ssl certificate for your domain and set your

View file

@ -4,12 +4,12 @@ touch /var/log/nginx/access.log
touch /var/log/nginx/error.log touch /var/log/nginx/error.log
touch /var/log/cron/owncloud.log touch /var/log/cron/owncloud.log
echo "# Options in here overwrite the builtin php.ini" > /php.ini echo "# Options in here overwrite the builtin php.ini" > /config/php.ini
echo "# xdebug.mode = debug" >> /php.ini echo "# xdebug.mode = debug" >> /config/php.ini
echo "# xdebug.start_with_request = yes" >> /php.ini echo "# xdebug.start_with_request = yes" >> /config/php.ini
chmod 0777 /php.ini chmod 0777 /config/php.ini
PHP_INI_DIR="$(php --ini | grep 'Scan' | cut -d ' ' -f7)" PHP_INI_DIR="$(php --ini | grep 'Scan' | cut -d ' ' -f7)"
ln -s /php.ini "$PHP_INI_DIR/zz_extra.ini" ln -s /config/php.ini "$PHP_INI_DIR/zz_extra.ini"
HAZE_UID=${HAZE_UID:-www-data} HAZE_UID=${HAZE_UID:-www-data}
HAZE_GID=${HAZE_GID:-www-data} HAZE_GID=${HAZE_GID:-www-data}

View file

@ -469,7 +469,7 @@ pub enum HazeCommand {
Edit, Edit,
/// Reload the php configuration in the instance /// Reload the php configuration in the instance
#[strum(props( #[strum(props(
Details = "note: you can overwrite <yellow>php.ini</yellow> settings with <literal>haze</literal> <arg>[filter]</arg> <literal>edit /php.ini</literal>" Details = "note: you can overwrite <yellow>php.ini</yellow> settings with <literal>haze</literal> <arg>[filter]</arg> <literal>edit /config/php.ini</literal>"
))] ))]
Reload, Reload,
} }

View file

@ -161,7 +161,7 @@ pub fn default_mappings<'a>() -> impl IntoIterator<Item = Mapping<'a>> {
.dont_create(), .dont_create(),
Mapping::new(WorkDir, "xdebug", "/tmp/xdebug"), Mapping::new(WorkDir, "xdebug", "/tmp/xdebug"),
Mapping::new(WorkDir, "profiling", "/tmp/profiling"), Mapping::new(WorkDir, "profiling", "/tmp/profiling"),
Mapping::new(WorkDir, "php.ini", "/php.ini").file(), Mapping::new(WorkDir, "php-config", "/config"),
]; ];
IntoIterator::into_iter(mappings) IntoIterator::into_iter(mappings)
} }