Intentando incluir PHP 7 en el contenedor de Discourse

Estoy intentando actualizar Discourse pero está fallando en este comando

I, [2024-10-01T23:08:46.462452 #1]  INFO -- : > apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring
E: El paquete 'php7.4' no tiene un candidato para la instalación
E: No se puede localizar el paquete php7.4-curl
E: No se pudo encontrar ningún paquete por glob 'php7.4-curl'
E: No se pudo encontrar ningún paquete por regex 'php7.4-curl'
E: El paquete 'php7.4-fpm' no tiene un candidato para la instalación
E: No se puede localizar el paquete php7.4-mbstring
E: No se pudo encontrar ningún paquete por glob 'php7.4-mbstring'
E: No se pudo encontrar ningún paquete por regex 'php7.4-mbstring'
I, [2024-10-01T23:08:47.335246 #1]  INFO -- : Leyendo listas de paquetes...
Construyendo árbol de dependencias...
Leyendo la información de estado...
El paquete php7.4 no está disponible, pero es referenciado por otro paquete.
Esto puede significar que el paquete falta, ha sido obsoleto, o
solo está disponible desde otra fuente

El paquete php7.4-fpm no está disponible, pero es referenciado por otro paquete.
Esto puede significar que el paquete falta, ha sido obsoleto, o
solo está disponible desde otra fuente


FAILED
--------------------
Pups::ExecError: apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring falló con el retorno #<Process::Status: pid 2912 exit 100>
Ubicación del fallo: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in spawn'
exec falló con los parámetros "apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring"
falló el arranque con el código de salida 100
** FALLÓ EL ARRANQUE ** por favor desplázate hacia arriba y busca mensajes de error anteriores, puede haber más de uno.
./discourse-doctor puede ayudar a diagnosticar el problema.
d87ce61f0dbfc527ede7d3c09e222eff42934608174066401b2317d05193786b
root@htd-9-feb-22-live:/var/discourse#

Discourse está instalado usando NGINX interno.
Así que estoy intentando actualizar Discourse, que tiene 2 años, de la versión 3.2 a la 3.4, creo.

Así que ejecuté los siguientes comandos:

 1465  cd /var/discourse
 1466  git pull
 1467  ./launcher bootstrap web_only && ./launcher destroy web_only && ./launcher start web_only

El archivo YAML se ve así, he eliminado la información personal:

# IMPORTANTE: ESTABLECE UNA CONTRASEÑA SECRETA en Postgres para el Usuario de Discourse
# TODO: cambia SOME_SECRET en esta plantilla

templates:
  - "templates/web.template.yml"
    #- "templates/web.ratelimited.template.yml"
  - "shared/web-only/amp/web.amp.template.yml"
    #- "shared/web_only/amp/templates/web.amp.template.yml"
  ## Descomenta estas dos líneas si deseas añadir Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## ¿Qué puertos TCP/IP debe exponer este contenedor?
## Si deseas que Discourse comparta un puerto con otro servidor web como Apache o nginx,
## consulta https://meta.discourse.org/t/17247 para obtener detalles
expose:
  - "80:80" # http
  - "443:443" # https

# Usa la clave 'links' para enlazar contenedores, es decir, usar el flag --link de Docker.
links:
  - link:
      name: data
      alias: data

# ¿Algún argumento adicional para Docker?
# docker_args:

params:
  ## ¿Qué revisión de Git debe usar este contenedor? (por defecto: tests-passed)
  #version: tests-passed

env:
  LC_ALL: en_US.UTF-8
  LANG: en_US.UTF-8
  LANGUAGE: en_US.UTF-8
  #EMBER_CLI_PROD_ASSETS: 1

  # DISCOURSE_DEFAULT_LOCALE: en
  # Límites de tasa globales que deshabilitan los límites de tasa para permitir que la corrección de SEO rastree y elimine el error de solicitud 429 demasiado frecuente

  DISCOURSE_MAX_REQS_PER_IP_MODE: none

  ## ¿Cuántas solicitudes web concurrentes se admiten? Depende de la memoria y los núcleos de CPU.
  ## se establecerá automáticamente mediante bootstrap según las CPU detectadas, o puedes anularlo
  UNICORN_WORKERS: 32

  ## TODO: El nombre de dominio al que responderá esta instancia de Discourse
  #DISCOURSE_HOSTNAME: hidden
  DISCOURSE_HOSTNAME:hidden

  ## Descomenta si deseas que el contenedor se inicie con el mismo
  ## nombre de host (-h option) que se especifica arriba (por defecto "$hostname-$config")
  #DOCKER_USE_HOSTNAME: true

  ## TODO: Lista de correos electrónicos separados por comas que se convertirán en administradores y desarrolladores
  ## en el registro inicial, por ejemplo 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: "hidden"

  ## TODO: El servidor de correo SMTP utilizado para validar nuevas cuentas y enviar notificaciones
  # DIRECCIÓN SMTP, nombre de usuario y contraseña son requeridos
  # ADVERTENCIA: el carácter '#' en la contraseña SMTP puede causar problemas.
  DISCOURSE_SMTP_ADDRESS: hidden
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: hidden
  DISCOURSE_SMTP_PASSWORD: "hidden"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (opcional, por defecto true)
  DISCOURSE_SMTP_DOMAIN: hidden
  DISCOURSE_NOTIFICATION_EMAIL: hidden

  ## Si añadiste la plantilla Lets Encrypt, descomenta abajo para obtener un certificado SSL gratuito
  LETSENCRYPT_ACCOUNT_EMAIL: hidden
  ## TODO: configurar la conectividad a las bases de datos
  #ljlsdfj;sdfj;lkdsfj
  DISCOURSE_DB_SOCKET: ""
  #DISCOURSE_DB_USERNAME: hidden
  DISCOURSE_DB_PASSWORD: hidden
  DISCOURSE_DB_HOST: data
  DISCOURSE_REDIS_HOST: data

  ## La dirección CDN http o https para esta instancia de Discourse (configurada para tirar)
  ## consulta https://meta.discourse.org/t/14857 para obtener detalles


  ## La clave de la API de geolocalización Maxmind para la búsqueda de direcciones IP
  ## consulta https://meta.discourse.org/t/-/137387/23 para obtener detalles


volumes:
  - volume:
      host: /var/discourse/shared/web-only
      guest: /shared
  - volume:
      host: /var/discourse/shared/web-only/log/var-log
      guest: /var/log

## Los plugins van aquí
## consulta https://meta.discourse.org/t/19157 para obtener detalles
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          #- git clone https://github.com/discourse/discourse-sitemap.git
          #- git clone https://github.com/discourse/discourse-math.git # plugin personalizado para soporte de JAX matemático
          #- git clone https://github.com/discourse/discourse-solved.git # plugin personalizado para preguntas y respuestas y elección de la mejor respuesta
          #- git clone https://github.com/discourse/discourse-voting.git # plugin personalizado para votar solo en temas
          #- git clone https://github.com/discourse/discourse-yearly-review.git # plugin personalizado para publicar automáticamente un tema anual de actividad del foro
          #- git clone https://github.com/discourse/discourse-user-notes.git # plugin personalizado para permitir al personal añadir notas sobre un usuario
          #- git clone https://github.com/paviliondev/discourse-question-answer.git # plugin personalizado no oficial para votación de estilo SO en publicaciones
          #- git clone https://github.com/discourse/discourse-adplugin.git # plugin oficial personalizado para anuncios
          #- git clone https://github.com/discourse/discourse-whos-online.git # plugin personalizado para ver quién está en línea
          #- git clone https://github.com/paviliondev/discourse-topic-previews.git # plugin personalizado para mostrar vistas previas de temas de forma agradable
          #- git clone https://github.com/paviliondev/discourse-ratings.git # plugin personalizado para permitir la calificación de temas por parte del usuario
          #- git clone https://github.com/discourse/discourse-cakeday.git # plugin oficial para celebraciones de cumpleaños y fechas de unión
          #- git clone https://github.com/discourse/discourse-saved-searches.git # plugin oficial para notificaciones de búsqueda guardada
          #- git clone https://github.com/paviliondev/discourse-follow.git # plugin personalizado para permitir que los usuarios se sigan mutuamente
          - git clone https://github.com/FaizanZahid/discourse-amp-htd-plugin.git # soporte AMP personalizado para HTD
          #- git clone https://github.com/discourse/discourse-assign.git # personalizado para asignar temas al personal
          #- git clone https://github.com/paviliondev/x-discourse-tlp-thumbnail.git # plugin personalizado para mostrar miniaturas de imágenes CDN
          #- git clone https://github.com/discourse/discourse-prometheus.git # plugin personalizado para monitoreo de velocidad lenta
          #- git clone https://github.com/discourse/discourse-push-notifications.git # plugin para notificaciones push

## Recuerda, esto es sintaxis YAML - solo puedes tener un bloque con el nombre worker_conn era 3000
run:
  - exec: echo "Comienzo de comandos personalizados"
  - replace:
      filename: "/etc/nginx/nginx.conf"
      from: "worker_connections 768"
      to: "worker_connections 4000"
  - replace:
      filename: "/etc/nginx/nginx.conf"
      from: "worker_processes auto"
      to: "worker_processes 16"

  ## Si deseas configurar el inicio de sesión con contraseña para root, descomenta y cambia:
  ## Usa solo una de las siguientes líneas:
  #- exec: /usr/sbin/usermod -p 'HASH_DE_CONTRASEÑA' root
  #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'CONTRASEÑA_CRUDA')" root

  ## Si deseas autorizar usuarios adicionales, descomenta y cambia:
  #- exec: ssh-import-id username
  #- exec: ssh-import-id anotherusername

  - exec: echo "Fin de comandos personalizados"
  - exec: awk -F\\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Claves SSH autorizadas para este contenedor:"; } NF>=2 {print $NF;}'

¿Alguien puede ayudarme a arreglarlo ya que mi sitio está caído ahora?

También estaba pensando en hacer

./launcher rebuild data

No hay nginx ni PHP instalados en mi servidor, esto significa que está usando nginx interno y PHP interno. Entonces, ¿qué hago para arreglarlo y actualizar mi contenedor de Discourse y datos?

Elimina esta línea aquí.

1 me gusta

Thanks @Falco …Yes i have commented it and it works fine but
i need AMP pages to work using below script, so i need to update here so it works with latest PHP version? because if i comment AMP template then AMP pages will not work.

below is web.amp.template.yml

hooks:
  after_ssl:
    # mkdir tmp/amp_cache/
  - exec: apt-get update
  - exec: apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring
  - exec: apt-get install -y php7.4-mbstring php7.4-xml
  - exec: mkdir -p /run/php

  - replace:
      filename: "/etc/nginx/conf.d/discourse.conf"
      from: /gzip_proxied any;/
      to: |
        gzip_proxied any;
        ## BEGIN inserted by web.amp.template.ymly
        location /ads.txt {
          alias /shared/amp/ads.txt;
        }
        if ($arg_amp) { rewrite ^ /amp/index.php?q=$uri last; }

        location ~ \\.php\\$ {
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $request_filename;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        }

        location @amp {
          rewrite ^/amp(.*) /amp/index.php?q=$1;
        }
        
        location /custom_widgets.php {
          include         fastcgi_params;
          root  /shared/amp/api/;
          fastcgi_pass    unix:/run/php/php7.4-fpm.sock;
          fastcgi_param   SCRIPT_FILENAME  /shared/amp/api/custom_widgets.php;
          fastcgi_param   QUERY_STRING     $query_string;
          fastcgi_param   REQUEST_METHOD   $request_method;
          fastcgi_param   CONTENT_TYPE     $content_type;
          fastcgi_param   CONTENT_LENGTH   $content_length;
        }
        
        
        location /amp {
          index index.php;
          try_files $uri $uri/ @amp;
          alias /shared/amp;
          location ~ \\.php$ {
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $request_filename;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock;
          }
        }
        ## END inserted by web.amp.template.ymly

  - file:
     path: /etc/service/phpfpm/run
     chmod: "+x"
     contents: |
        #!/bin/sh
        exec 2>&1
        exec /usr/sbin/php-fpm7.4 --nodaemonize

  - file:
     path: /etc/runit/3.d/01-phpfpm
     chmod: "+x"
     contents: |
       #!/bin/bash
       sv stop phpfpm

what changes I need to do there?

if i do

hooks:
  after_ssl:
    # mkdir tmp/amp_cache/
  - exec: apt-get update
  #- exec: apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring
  - exec: apt-get install -y php8.1-mbstring php8.1-xml
  #- exec: apt-get install -y php7.4-mbstring php7.4-xml
  #- exec: apt-get install -y php8.1-xml
  - exec: mkdir -p /run/php

i get below errors

nvoke-rc.d: policy-rc.d denied execution of reload.
start-stop-daemon: unable to stat /usr/libexec/polkitd (No such file or directory)
Setting up packagekit (1.2.6-5) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of force-reload.
Failed to open connection to "system" message bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Created symlink /etc/systemd/user/sockets.target.wants/pk-debconf-helper.socket → /usr/lib/systemd/user/pk-debconf-helper.socket.
Setting up packagekit-tools (1.2.6-5) ...
Setting up software-properties-common (0.99.30-4.1~deb12u1) ...
Processing triggers for dbus (1.14.10-1~deb12u1) ...

I, [2024-10-02T01:05:32.803478 #1]  INFO -- : > add-apt-repository ppa:ondrej/php
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 362, in <module>
    sys.exit(0 if addaptrepo.main() else 1)
                  ^^^^^^^^^^^^^^^^^
  File "/usr/bin/add-apt-repository", line 345, in main
    shortcut = handler(source, **shortcut_params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler
    return handler(shortcut, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 86, in __init__
    if self.lpppa.publish_debug_symbols:
       ^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 126, in lpppa
    self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)
                  ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 113, in lpteam
    self._lpteam = self.lp.people(self.teamname)
                   ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'people'
I, [2024-10-02T01:05:33.029140 #1]  INFO -- :


FAILED
--------------------
Pups::ExecError: add-apt-repository ppa:ondrej/php failed with return #<Process::Status: pid 3887 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in spawn'
exec failed with the params "add-apt-repository ppa:ondrej/php"
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
b74ec42509c5559c7814ad3011f49969bd7aba5fd92d2ba16717584dae2f9e4f
root@htd-9-feb-22-live:/var/discourse#

I have tried to update the file to 8.2 php as below, but i still get errors

hooks:
  after_ssl:
    # mkdir tmp/amp_cache/
  - exec: apt-get update
  #- exec: apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring
  #- exec: apt-get install -y php7.4-mbstring php7.4-xml
  # Install software-properties-common to add repositories
  - exec: apt-get install -y software-properties-common
  # Add the Ondřej Surý PPA for the latest PHP versions
  - exec: add-apt-repository -y ppa:ondrej/php
  - exec: apt-get update
  # Install the latest version of PHP and the required extensions
  - exec: apt-get install -y php8.2 php8.2-curl php8.2-fpm php8.2-mbstring php8.2-xml
  - exec: mkdir -p /run/php

  - replace:
      filename: "/etc/nginx/conf.d/discourse.conf"
      from: /gzip_proxied any;/
      to: |
        gzip_proxied any;
        ## BEGIN inserted by web.amp.template.ymly
        location /ads.txt {
          alias /shared/amp/ads.txt;
        }
        if ($arg_amp) { rewrite ^ /amp/index.php?q=$uri last; }

        location ~ \\.php\\$ {
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $request_filename;
          #fastcgi_pass unix:/run/php/php7.4-fpm.sock;
          fastcgi_pass unix:/run/php/php8.2-fpm.sock;

        }

        location @amp {
          rewrite ^/amp(.*) /amp/index.php?q=$1;
        }
        
        location /custom_widgets.php {
          include         fastcgi_params;
          root  /shared/amp/api/;
          #fastcgi_pass    unix:/run/php/php7.4-fpm.sock;
          fastcgi_pass    unix:/run/php/php8.2-fpm.sock;
          fastcgi_param   SCRIPT_FILENAME  /shared/amp/api/custom_widgets.php;
          fastcgi_param   QUERY_STRING     $query_string;
          fastcgi_param   REQUEST_METHOD   $request_method;
          fastcgi_param   CONTENT_TYPE     $content_type;
          fastcgi_param   CONTENT_LENGTH   $content_length;
        }
        
        
        location /amp {
          index index.php;
          try_files $uri $uri/ @amp;
          alias /shared/amp;
          location ~ \\.php$ {
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $request_filename;
          #fastcgi_pass unix:/run/php/php7.4-fpm.sock;
          fastcgi_pass unix:/run/php/php8.2-fpm.sock;

          }
        }
        ## END inserted by web.amp.template.ymly

  - file:
     path: /etc/service/phpfpm/run
     chmod: "+x"
     contents: |
        #!/bin/sh
        exec 2>&1
        #exec /usr/sbin/php-fpm7.4 --nodaemonize
        exec /usr/sbin/php-fpm8.2 --nodaemonize


  - file:
     path: /etc/runit/3.d/01-phpfpm
     chmod: "+x"
     contents: |
       #!/bin/bash
       sv stop phpfpm

Getting below error

Setting up packagekit (1.2.6-5) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of force-reload.
Failed to open connection to "system" message bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Created symlink /etc/systemd/user/sockets.target.wants/pk-debconf-helper.socket → /usr/lib/systemd/user/pk-debconf-helper.socket.
Setting up packagekit-tools (1.2.6-5) ...
Setting up software-properties-common (0.99.30-4.1~deb12u1) ...
Processing triggers for dbus (1.14.10-1~deb12u1) ...

I, [2024-10-02T01:32:10.341970 #1]  INFO -- : > add-apt-repository -y ppa:ondrej/php
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 362, in <module>
    sys.exit(0 if addaptrepo.main() else 1)
                  ^^^^^^^^^^^^^^^^^
  File "/usr/bin/add-apt-repository", line 345, in main
    shortcut = handler(source, **shortcut_params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler
    return handler(shortcut, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 86, in __init__
    if self.lpppa.publish_debug_symbols:
       ^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 126, in lpppa
    self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)
                  ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 113, in lpteam
    self._lpteam = self.lp.people(self.teamname)
                   ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'people'
I, [2024-10-02T01:32:10.554558 #1]  INFO -- :


FAILED
--------------------
Pups::ExecError: add-apt-repository -y ppa:ondrej/php failed with return #<Process::Status: pid 3885 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params "add-apt-repository -y ppa:ondrej/php"
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
8ec2386561b45752c20182c8f592036fa0921f1e81c3bd17b50c9ca2660a2354
root@htd-9-feb-22-live:/var/discourse#

My original file was

hooks:
  after_ssl:
    # mkdir tmp/amp_cache/
  - exec: apt-get update
  - exec: apt-get install -y php7.4 php7.4-curl php7.4-fpm php7.4-mbstring
  - exec: apt-get install -y php7.4-mbstring php7.4-xml
  - exec: mkdir -p /run/php

  - replace:
      filename: "/etc/nginx/conf.d/discourse.conf"
      from: /gzip_proxied any;/
      to: |
        gzip_proxied any;
        ## BEGIN inserted by web.amp.template.ymly
        location /ads.txt {
          alias /shared/amp/ads.txt;
        }
        if ($arg_amp) { rewrite ^ /amp/index.php?q=$uri last; }

        location ~ \\.php\\$ {
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $request_filename;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        }

        location @amp {
          rewrite ^/amp(.*) /amp/index.php?q=$1;
        }
        
        location /custom_widgets.php {
          include         fastcgi_params;
          root  /shared/amp/api/;
          fastcgi_pass    unix:/run/php/php7.4-fpm.sock;
          fastcgi_param   SCRIPT_FILENAME  /shared/amp/api/custom_widgets.php;
          fastcgi_param   QUERY_STRING     $query_string;
          fastcgi_param   REQUEST_METHOD   $request_method;
          fastcgi_param   CONTENT_TYPE     $content_type;
          fastcgi_param   CONTENT_LENGTH   $content_length;
        }
        
        
        location /amp {
          index index.php;
          try_files $uri $uri/ @amp;
          alias /shared/amp;
          location ~ \\.php$ {
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $request_filename;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock;
          }
        }
        ## END inserted by web.amp.template.ymly

  - file:
     path: /etc/service/phpfpm/run
     chmod: "+x"
     contents: |
        #!/bin/sh
        exec 2>&1
        exec /usr/sbin/php-fpm7.4 --nodaemonize

  - file:
     path: /etc/runit/3.d/01-phpfpm
     chmod: "+x"
     contents: |
       #!/bin/bash
       sv stop phpfpm

Can you please give me correct way to install correct PHP version to not face this issue and i can rebuild successfully with AMP template?

Realmente no, ya que esto nunca fue compatible con Discourse y es algo completamente personalizado.

PHP 7.4 llegó al final de su vida útil hace casi tres años, así que sospecho que querrás aumentar ese número de versión a algo como 8.3.

Sugiero que mantengas PHP y toda la lógica asociada en un contenedor separado y simplemente hagas un proxy de todo /amp hacia él.

3 Me gusta