Anatomy of a Divio project¶
A Divio project is contained in a Git repository. The files in the repository are used to build the project image, from which its containers are instantiated.
The key file is the
Dockerfile that defines the project.
Local development files¶
Some files are only present, or only used, when in the local development environment.
Added to the local project by the
divio project setup command, to provide an identifier for the
corresponding cloud project. Not part of the repository.
On the cloud, environment variables can be set via the Control Panel. Locally, they can be supplied
.env-local. This is part of the repository, so it is recommended not to commit sensitive
The docker-compose.yml file describes the Docker configuration of the local environment, and the services compose the whole Docker application. It’s part of the repository, but is ignored on the cloud.
For local development use only. In
media directory functions as the local analogue
of Cloud project’s S3 storage bucket (see How to interact with your project’s cloud media storage).
Aldryn Addons directories¶
Not all projects use the Aldryn Addons system. Those that do will contain:
For each addon in your project, a directory will be created in
addon.json: basic metadata for the addon (generally, there is no need ever to edit this file)
aldryn_config.py: optional; manages settings for the addon (see aldryn_config.py explanation and how to create an aldryn_config.py file)
settings.json: any settings that were applied via the Control Panel, so that they can be used locally
For local development use only. An addon can be placed here for development purposes.
addons-dev contains a little magic; any packages within directories in
automatically be placed on the Python path for convenience.
divio project develop <addon> for an addon in
addons-dev will add it to the
settings.INSTALLED_ADDONS, then attempt to build the