Home

Awesome

Supported tags and respective Dockerfile links

About this Repo

This automated build is based on the official Wordpress automated build image, and supports similar tags.

Quickstart

If you'd like to get up and running quickly, this image can be run without any linked containers.

$ docker run --name some-october -p 8080:80 -d dragontek/octobercms

This will start the container up and initialize a local SQLite instance for the database, and you can visit the site by going to http://localhost:8080. The default username and password for the backend are both 'admin'.

October provides a great interface for modifying files directly through the backend, and for many tasks, such as theme development, this may be sufficient. When you're finished, you can simply use the theme export feature. Just remember not to remove the docker container, or you will lose your changes.

The image also exposes the /var/www/html folder, so if you would like to use a local editor, you can mount that volume to your local machine:

$ docker run --name some-october -p 8080:80 -v $(pwd):/var/www/html -d dragontek/octobercms

This will start the container and copy full website to the current directory. This is a better option for tasks such as plugin development.

Database Support

The examples so far have used a local SQLite instance, but for production you will probably want to use either MySQL/MariaDB or Postgres. This image supports linking of both database engines.

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=example -d mariadb
$ docker run --name some-october --link some-mysql:mysql -d dragontek/octobercms

or

$ docker run --name some-postgres -e POSTGRES_PASSWORD=example -d postgres
$ docker run --name some-october --link some-postgres:postgres -d dragontek/octobercms

These commands will start up the database, link the containers and configure October to use the appropriate database.

... via docker-compose

Basic Example docker-compose.yml for dragontek/octobercms:

version: '2'
services:
  web:
    image: "dragontek/octobercms"
    ports:
     - "8080:80"
  mysql:
    image: "mariadb"
    environment:
     - MYSQL_ROOT_PASSWORD=example
  memcached:
    image: "memcached"

Advanced Example docker-compose.yml for dragontek/octobercms:

version: '2'
services:
  web:
    image: "dragontek/octobercms"
    ports:
     - "8080:80"
    depends_on:
     - postgres
     - memcached
     - redis
    environment:
     - GIT_HOSTS=gitlab.com
     - GIT_THEMES=git@gitlab.com:path/mytheme.git
     - OCTOBER_CMS_ACTIVE_THEME=mytheme
     - OCTOBER_PLUGINS=October.Drivers;RainLab.GoogleAnalytics;
     - OCTOBER_DB_DRIVER=pgsql
     - OCTOBER_DB_HOST=postgres
     - OCTOBER_DB_PASSWORD=example
     - OCTOBER_CACHE_DEFAULT=memcached
     - OCTOBER_SESSION_DRIVER=redis
    volumes:
     - ~/.ssh/id_rsa:/root/.ssh/id_rsa
  postgres:
    image: "postgres"
    environment:
     - POSTGRES_PASSWORD=example
  memcached:
    image: "memcached"
  redis:
    image: "redis"

Database Environment Variables

The following environment variables are honored for configuring your October instance:

October Themes and Plugins

Themes and/or plugins can be installed from the marketplace with the following environment variables:

Use semicolon separated list for multiple themes or plugins (e.g. -e OCTOBER_PLUGINS="RainLab.Blog;RainLab.GoogleAnalytics")

Git Themes and Plugins

Themes and/or plugins can be installed from the git repositories with the following environment variables:

Use semicolon separated list for multiple themes or plugins (e.g. -e GIT_THEMES="git@gitlab.com:path/repo.git")

If you use a private repository, then you should map your private key to the container (e.g -v ~/.ssh/id_rsa:/root/.ssh/id_rsa)

Another solution is to get an "Personal Access Token" from your repository provider and use https instead (e.g. -e GIT_THEMES="https://username:token@gitlab.com:path/repo.git")

Please note that for Plugins, it will determine namespace based on your repository path (e.g git@gitlab.com:mycompany/blog.git will clone into /plugins/mycompany/blog)

Other Environment Variables

Most of the configuration settings can be set through environment variables. The format always starts with OCTOBER_ and then the configuration file name (e.g. APP_), and then the property name (e.g. DEBUG). Property names that are camel case are split by the underscore, as are any sub properties. Please refer to the configuration files for more detailed explanations and for valid settings.

APP settings

CMS settings

FILESYSTEMS settings

MAIL settings

SERVICES settings

SESSION settings

Notes

Work on this image is ongoing, and I intend to support more environment variables to allow the user to configure more of their October instance.

Please let me know what else you'd like to see.