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
cdinside it:
$ cd cms-docker-
Create a
docker-compose.ymlfile. You can use the existing__docker-compose.*.ymlas 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.confandcms.ranking.conffiles -
Let's say that you named your service
mycms. Build it:docker-compose build mycms -
Run it:
$ docker-compose up -d mycmsThe -d detaches from the service log data; if you want, you can remove the flag to stay attached
- Now the
mycmsservice should be running, verify this by issuing:
$ docker-compose psYou'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 mycmsTo stop the service, issue:
$ docker-compose stop mycms