Project directory structure

Local project directory structure

Not including the Magento application itself, your local project has the following structure:

├── .git
├── .gitignore
├── .magento
│   ├── routes.yaml
│   └── services.yaml
├── .magento.app.yaml
├── auth.json
├── composer.json
├── composer.lock
├── magento-vars.php
├── php.ini
└── README.md

When you push your local environment to the remote server, our deploy script uses the values defined by configuration files in the .magento directory, then the script deletes the directory and its contents. Your local development environment isn't affected.

Magento Commerce (Cloud) directories

The following sections discuss information you need to know about directories in the systems deployed to Magento Commerce (Cloud).

Magento application root directory

The Magento application root directory is located in different locations depending on the environment:

Writable directories

In Integration, Staging, and Production, only the following directories are writable due to security reasons:

  • var
  • pub/static
  • pub/media
  • app/etc
  • /tmp

In Production, each node in the three-node cluster has a /tmp directory that is not shared with the other nodes.

Logs

Logs for the integration, staging, and production environments are located under the /var/log directory. You can access that directory by opening an SSH tunnel to the environment using the magento-cloud environment:ssh -e <environment id> command.

In staging and production environments, the deployment log is located in /var/log/platform/<project ID>.

Magento logs are located in the <magento root dir>/var/log directory.

For more information