If your app logs, caches, or uploads, then you probably need access to where logs, caches, and uploaded files are stored—shared writable directories. After reading this guide, you should be familiar with:
- Accessing and managing your shared writable directories
- Accessing and managing custom logs
- Managing and clearing your apps' cached files
Before You Get Started
Enable SSH Access
Before you can manage your shared writable storage, you need to enable SSH access.
Access Your Shared Writable Directories
Connect Using the SSH Portal
Once you’ve enabled SSH access, you can connect to your shared writable directories through your terminal or through any other tools that use SSH, SCP, or SFTP protocols, including good ole FTP clients.
To connect through terminal, use the SSH connection string provided in the Admin tab of your app dashboard, and your specified SSH password.
TerminalOpening the Pagoda SSH Portal through Terminal
To connect using an FTP client, make sure you are using SSH File Transfer Protocol (SFTP). Use pagodabox.com as the server, your app name as the username, and your specified SSH password.
Once the SSH portal is open, you will see a "logs" directory and a "shared" directory. All of your shared writable storage is stored inside the "shared" directory. Shared writable directories are specified in your Boxfile. For more information, check out the "shared_writable_dirs" section of the Understanding the Boxfile Guide.
Custom Log Management
If your app has any custom loggers (any logger other than PHP's built-in error log), log files need to be stored in a shared writable directory. Management of custom logs is covered in the Custom Log Management Section of the Log Management Guide.
Any files cached by your app need to be stored in a shared writable directory. This allows all of your app clones to write to and pull from the same cache. The Pagoda SSH Portal allows you to access and clear your apps' cached files.
Clearing Your Cache Through Terminal
To clear your cache through your terminal, cd into the directory where your cached files are stored and use the following command:
TerminalClearing Your Cache Through Terminal
This will delete all of the files in the directory you are currently in.
Clearing Your Cache Through an FTP Client
To clear your cache using an FTP client, simply navigate into the directory where your cached files are stored and delete all of your cached files.
The ability to create post-deploy hooks that will automatically clear your cache are coming soon.