Skip to content

Magento Cloud filesystem is readonly

I’m working on a Magento Cloud project after a other developers left it and I’m having a hard time figuring out the development cycle. I can change files on a branch and commit the changes, causing a build/deploy on the cloud environment, but every branch is on production mode with the filesystems being readonly and I don’t know how to revert this, even on a new branch.

I tried changing the mode in app/etc/env.php, but that causes an error during the deploy:
[2022-10-03 15:07:49] ERROR: [11] The command “php ./bin/magento module:enable –all –ansi –no-interaction” failed. In Abstract.php line 144:

  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name o  
  r service not known                                                          
                                                                               

In Abstract.php line 128:
                                                                               
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name o  
  r service not known                                                          
                                                                               

In Abstract.php line 128:
                                                                               
  PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or s  
  ervice not known                                                             
                                                                               
W: 
W: In Processor.php line 129:
W:                                                                                
W:   The command "php ./bin/magento module:enable --all --ansi --no-interaction"  
W:    failed. In Abstract.php line 144:                                 
W:                                                                        
W:                                                                        
W:     SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo fail  
W:   ed: Name o                                                           
W:     r service not known                                                
W:                                                                        
W:                                                                        
W:                                                                        
W:                                                                                
W:   In Abstract.php line 128:                                          
W:                                                                        
W:                                                                        
W:     SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo fail  
W:   ed: Name o                                                           
W:     r service not known                                                
W:                                                                        
W:                                                                        
W:                                                                        
W:                                                                                
W:   In Abstract.php line 128:                                          
W:                                                                        
W:                                                                        
W:     PDO::__construct(): php_network_getaddresses: getaddrinfo failed:  
W:    Name or s                                                           
W:     ervice not known                                                   
W:                                                                        
W:                                                                        
W:                                                                        
W:                                                                                
W: 
W: In RefreshModules.php line 63:
W:                                                                                
W:   The command "php ./bin/magento module:enable --all --ansi --no-interaction"  
W:    failed. In Abstract.php line 144:                                 
W:                                                                        
W:                                                                        
W:     SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo fail  
W:   ed: Name o                                                           
W:     r service not known                                                
W:                                                                        
W:                                                                        
W:                                                                        
W:                                                                                
W:   In Abstract.php line 128:                                          
W:                                                                        
W:                                                                        
W:     SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo fail  
W:   ed: Name o                                                           
W:     r service not known                                                
W:                                                                        
W:                                                                        
W:                                                                        
W:                                                                                
W:   In Abstract.php line 128:                                          
W:                                                                        
W:                                                                        
W:     PDO::__construct(): php_network_getaddresses: getaddrinfo failed:  
W:    Name or s                                                           
W:     ervice not known                                                   
W:                                                                        
W:                                                                        
W:                                                                        
W:                                                                                
W: 
W: In Shell.php line 86:
W:                                                                                
W:   The command "php ./bin/magento module:enable --all --ansi --no-interaction"  
W:    failed. In Abstract.php line 144:                                 
W:                                                                        
W:                                                                        
W:     SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo fail  
W:   ed: Name o                                                           
W:     r service not known                                                
W:                                                                        
W:                                                                        
W:                                                                        
W:                                                                                
W:   In Abstract.php line 128:                                          
W:                                                                        
W:                                                                        
W:     SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo fail  
W:   ed: Name o                                                           
W:     r service not known                                                
W:                                                                        
W:                                                                        
W:                                                                        
W:                                                                                
W:   In Abstract.php line 128:                                          
W:                                                                        
W:                                                                        
W:     PDO::__construct(): php_network_getaddresses: getaddrinfo failed:  
W:    Name or s                                                           
W:     ervice not known                                                   
W:                                                                      

How can I create a new branch in developer mode? And can I enable a module in this readonly filesystem? Setting the module status to 1 in app/etc/config.php didn’t work.