Skip to main content

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

Comments

1 comment

  • Royall

    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
    
    0

Please sign in to leave a comment.