The Divio application¶
The Divio app is a GUI application for interacting with local projects and the Divio Cloud. It also sets up the Divio Shell.
The Divio application opens with a list of the projects available to you.
Select from All projects, or the projects in your Personal/Organisation views. You can also
filter projects by name using the search field. The equivalent command is
divio project list.
Select a project to see its status in your local environment.
The toolbar at the bottom of the application interface is always available and provides some useful controls:
Open shell will open a shell environment, running in Docker itself, with your keys and access to projects set up automatically.
The other icons give you:
- Docker status
- help options
- Divio application preferences
Setting up a project¶
When you select a project for the first time, you will be given the option to set it up.
When you select Set up project, the Divio application will clone the project’s repository to the directory specified in the the application’s preferences, build it, and finally pull down its media and database. While it does this, it will also display the local build log.
The command-line equivalent is
divio project setup <project slug>; the process is described in
more detail in the project build process. The process can take a few minutes.
Once successfully set up, the application will show more information and options for managing the project.
Managing a project¶
Project list/open Dashboard¶
Return to list of projects; open the project Dashboard in the Control Panel (equivalent to
Download and Upload controls for:
- code (equivalent: using
gitcommands to interact with the repository)
- media (equivalent: using
divio project push mediaand
divio project push mediacommands)
- database (equivalent: using
divio project push dband
divio project push dbcommands)
Open local files¶
Open the local project directory for access to the files.
Start to launch the local project (or Stop if it is already running).
Options when running¶
The other options are only available when the project is running locally:
Respectively, they will:
- open the local site in your browser
- open a console displaying the site runtime logs in a Divio shell; equivalent to
docker-compose logs -f --tail=100
- open a shell inside the local site’s
webcontainer; equivalent to
docker-compose exec web /bin/bash
- present additional options for managing the Docker build:
- Update - equivalent to
divio project update(pulls latest Git commits, rebuilds)
- Rebuild - equivalent to
docker-compose build web
- Reset - equivalent to
docker-compose rmto tear down the project, followed by
divio project setupto rebuild it.
- Update - equivalent to
When first run, the Divio app will:
- download Docker
- install Docker
- launch it
- set up a local Docker image that provides a Bash shell interface for issuing
diviocommands, even if the Divio CLI has not been installed globally
The Divio Shell¶
The Divio Shell is a pre-configured shell environment for interacting with local Divio projects. It’s launched with the open shell button in the toolbar of the Divio app, and drops you in a bash prompt, in your Divio Cloud workspace directory.
The Divio Shell is configured with the SSH keys required to give you access to our Cloud servers. You don’t have to use the Divio Shell (you can use an ordinary session in your terminal) but in that case you will need to set up keys yourself.
The Divio Shell and the local container’s bash shell are quite different.
- The Divio Shell is for interacting with your Divio projects.
- The local container bash shell is inside an instance of a particular project, allowing you to interact with its program code and operations.
Creating the Divio shell¶
The Divio app creates the shell by running a sequence of commands, expanded here for clarification:
# clear the terminal window clear # set the path for this shell PATH=$HOME/.local/bin:/usr/local/bin:$PATH # clears the DOCKER_HOST environment variable, in case something else has set it unset DOCKER_HOST # runs a docker command in a new container, with interactive TTY access, removing it on exit docker run -it --rm \ # ... mounting these volumes in the container: -v '/var/run/docker.sock:/var/run/docker.sock:rw' \ -v '/Users/daniele/.netrc:/home/divio/.netrc:rw' \ -v '/Users/daniele/.aldryn:/home/divio/.aldryn:rw' \ -v '/Users/daniele/divio-cloud-projects:/Users/daniele/divio-cloud-projects:rw' # ... using the image: divio/divio-app-toolbox:daniele-0.10.5-daniele.procida_divio.ch # ... and in the new container, run the following commands: cd /Users/daniele/divio-cloud-projects divio doctor bash