This repository aims to ease the process of building and running the CMS software and its variations, like CMSocial.
Make sure you have installed the following:
- docker
- docker-compose (this is not essential, but will make it easier to boot containers correctly)
(each URL points to the relevant installation instructions)
- Clone this repository and
cd
inside it:
$ cd cms-docker
-
Create a
docker-compose.yml
file. You can use the existing__docker-compose.*.yml
as templates by removing/editing the existing services. You should make sure that the container's/usr/local/etc/
folder correctly maps to a folder on the docker host which contains validcms.conf
andcms.ranking.conf
files -
Let's say that you named your service
mycms
. Build it:docker-compose build mycms
-
Run it:
$ docker-compose up -d mycms
The -d
detaches from the service log data; if you want, you can remove the flag to stay attached
- Now the
mycms
service should be running, verify this by issuing:
$ docker-compose ps
You're done! Now you should be able to access http://localhost:port
(the ports exposed in docker-compose.yml
) from your browser.
This passage is not needed (in theory) but can be very useful for debugging or for "emergencies" 😄
If you want to obtain direct access to the service (e.g. to make a quick edit without rebuilding and restarting it) the easiest way, until docker includes a specific command to do that, is to add this function to your ~/.bashrc
file:
## Very useful function to get inside docker containers
## NOTE: you can change "enter" to anything else, if needed
enter() {
docker exec -ti $1 env TERM=xterm bash -l
}
Then restart your terminal (close it and reopen it), and you should be able to get inside the mycms
service by issuing:
$ enter mycms
To stop the service, issue:
$ docker-compose stop mycms