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

Add support for frankenphp

This commit is contained in:
Carl Schwan 2026-03-10 16:26:27 +01:00
commit 87d33e01d2
No known key found for this signature in database
GPG key ID: 02325448204E452A
3 changed files with 27 additions and 3 deletions

View file

@ -74,6 +74,11 @@ then
'&
fi
php-fpm --fpm-config /etc/php-fpm.conf&
nginx -c /etc/nginx.conf
if [ -n "${FRANKENPHP:-}" ]
then
php-fpm --fpm-config /etc/php-fpm.conf&
nginx -c /etc/nginx.conf
else
frankenphp run
fi

View file

@ -33,6 +33,7 @@
writeShellApplication,
vim,
helix,
frankenphp,
}: let
inherit (builtins) toString;
inherit (lib) readFile getExe concatStringsSep splitString take;
@ -145,6 +146,7 @@
oracle-instantclient
vim
helix
frankenphp
];
};

View file

@ -207,6 +207,19 @@ impl ServiceTrait for RedisTls {
}
}
#[derive(Clone, Eq, PartialEq, Debug)]
pub struct FrankenPHP;
impl ServiceTrait for FrankenPHP {
fn name(&self) -> &str {
"frankenphp"
}
fn env(&self) -> &[&str] {
&["FRANKENPHP=1"]
}
}
#[derive(
Copy, Clone, Debug, PartialEq, EnumString, EnumMessage, EnumIter, IntoStaticStr, Display,
)]
@ -281,6 +294,8 @@ pub enum ServiceType {
Redis,
/// External redis instance with TLS
RedisTls,
/// FrankenPHP
FrankenPHP,
}
#[enum_dispatch]
@ -311,6 +326,7 @@ pub enum Service {
Redis(Redis),
RedisTls(RedisTls),
Preset(PresetService),
FrankenPHP(FrankenPHP),
}
impl Service {
@ -352,6 +368,7 @@ impl Service {
ServiceType::Mail => Some(vec![Service::Mail(Mail)]),
ServiceType::Redis => Some(vec![Service::Redis(Redis)]),
ServiceType::RedisTls => Some(vec![Service::RedisTls(RedisTls)]),
ServiceType::FrankenPHP => Some(vec![Service::FrankenPHP(FrankenPHP)]),
}
} else {
presets