The Cloud and local shells¶
On the Cloud you can SSH into a Cloud shell instance (available on ManagedCloud projects only). Locally, you can use the .
Once inside the shell, you can inspect the environment, run commands (such as ). It’s particularly useful to be able to drop into a:
- Python console: python
- database shell: python manage.py dbshell
Important
The Cloud and local shells described here are not to be confused with the Divio Shell.
The Cloud and local shells will provide you with terminal access inside a running project.
The Cloud shell is only available for Managed Cloud projects.
Your Cloud server must be deployed in order to reach it via SSH. You can copy SSH connectiondetails from the appropriate server pane in the Control Panel:
The command can be pasted into a terminal session on your own machine. An instance of your webapplication will be spun up in a new container, and after a moment you’ll be logged in to it as.
SSH sessions are limited to 30 minutes, regardless of any activity.
Files - any files you create or change on this instance will not affect those on any othercontainers.
Processes - each session is isolated from any other extant processes (web processes, workers,other shell sessions).
Caches - if your site’s cache relies on the database (the Divio Cloud Projects default) thenyour container will be able to make use of it, clear it and so on. However, if you’re using forexample a cache, it will not be available to your container.
The local shell¶
Open the shell¶
The Divio app provides a convenient short-cut:
Alternatively, you can use the command-line. In the project directory, run:
- docker-compose run --rm web bash # if you need to start the container too