Skip to content

Commit

Permalink
fix(php): update envs
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 12, 2024
1 parent 0b9f452 commit b8880ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions php/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn setup() -> Result<String, Error> {
let phpfpm_error_log_file = dag().get_env("PHPFPM_ERROR_LOG_FILE")?;

if phprc.is_empty() {
dag().set_envs(vec![("PHPRC".into(), pwd)])?;
dag().set_envs(vec![("PHPRC".into(), pwd.clone())])?;
}
if phpfpm_port.is_empty() {
dag().set_envs(vec![("PHPFPM_PORT".into(), "8080".into())])?;
Expand All @@ -40,14 +40,14 @@ pub fn setup() -> Result<String, Error> {
if phpfpm_pid_file.is_empty() {
dag().set_envs(vec![(
"PHPFPM_PID_FILE".into(),
".fluentci/php-fpm.pid".into(),
format!("{}/.fluentci/php-fpm.pid", pwd),
)])?;
}

if phpfpm_error_log_file.is_empty() {
dag().set_envs(vec![(
"PHPFPM_ERROR_LOG_FILE".into(),
".fluentci/log/php-fpm.error.log".into(),
format!("{}/.fluentci/log/php-fpm.error.log", pwd),
)])?;
}

Expand Down Expand Up @@ -75,7 +75,7 @@ pub fn setup() -> Result<String, Error> {
.with_exec(vec!["rm -rf ../vendor && mv vendor .."])?
.with_exec(vec!["[ -f ../php-fpm.conf ] || wget https://raw.githubusercontent.com/fluentci-io/services/main/php/php-fpm.conf -O ../php-fpm.conf"])?
.with_exec(vec![
"grep -q php-fpm Procfile || echo 'php-fpm: cd .. && php-fpm -y $PWD/php-fpm.conf --nodaemonize' >> Procfile",
"grep -q php-fpm Procfile || echo 'php-fpm: php-fpm -y ../php-fpm.conf --nodaemonize' >> Procfile",
])?
.stdout()?;

Expand Down

0 comments on commit b8880ae

Please sign in to comment.