This folder contains a possible docker-compose
setup for CAPS. To use it,
you need to copy the file caps.env.template
to caps.env
, and customize
the fields.
To start the container, you can run
sudo docker-compose up
For later updates, use
sudo docker-compose up --build
to regenerate the CAPS image. This will copy the files from the backend
folder into the image.
An alternative docker-compose-dev.yml
file is provided that mounts some directories
directly from the repository, to allow for automatic reloading of the PHP source files
during development.
A script that automatically builds the image and run the container together with
automatic regeneration of JS and CSS files is provided as start-dev-server.sh
.
If you wish to customize the configuration, you can edit docker/caps.env
. Otherwise,
an LDAP server with users user1
and user2
with their username as
passwords is created. In that case, you may wish to make one of the two an
administrator by running
$ sudo docker exec -it caps /backend/bin/cake grant-admin user1
once the Docker containers are running.
The configuration can also be used manually running
sudo docker-compose -f docker-compose-dev.yml up
Notice that files in config are not exported, if you change those you will need to
run docker-compose build
again.
The image is set up for automatic SSH forwarding of LDAP server that are not
publicly accessible, for development. In this case, you may set the variable
CAPS_SSH_TUNNEL
in caps.env
, and make sure that a private RSA key
is available at /backend/id_rsa
inside the container. For instance, it suffices
to have:
volumes:
- ./id_rsa:/backend/id_rsa
inside the container named caps
.