Can I just have my whole project read / write and serve my PHP website from here?

Hello,

I feel that having everything read-only by default prevents me from working fast enough - can I just make a mount to / and rsync then serve my PHP website from here, so I can open an editor and make my changes directly there?

Thanks!

The read-only disk for application code is a key facet of Platform’s security and developer experience. It prevents security flaws from allowing code to be overwritten and provides a trail of changes so every developer knows when any change was made to the code. Good commit messages might even explain why a change occurred!

Although we do not recommend this as a development practice, it is possible to work this way. Add a mount and location to .platform.app.yaml:

# set the application root as a mount (this will overwrite any code from git at deploy time)
mounts:
    '/':
        source: local
        source_path: uploads

web:
    locations:
        # Allow scripts to run from the mounted writable directory
        '/':
            scripts: true
            allow: true