You heard about Kirby CMS and want to use it on your next project? You want to harness the power of Docker? Then THIS is for you!
Here's my personal (thus opinionated) Docker+Kirby boilerplate, starring:
- Kirby CMS v3 - a file‑based CMS that's 'easy to setup, easy to use & flexible as hell'
- Docker Compose - a tool for defining and running multi-container Docker applications
Table of Contents
- Working Docker environment
- Composer
Download or clone this repository, then install the Gulp/Kirby StarterKit (or any other Kirby project):
# Composer
composer create-project s1syphos/gulp-kirby-starter-kit htdocs --no-dev --prefer-dist
# Git
git clone https://github.com/S1SYPHOS/Gulp-Kirby-Starter-Kit.git htdocs
# Move docker configuration files
mv docker htdocs/
Now just type docker-compose up
and code away!
This boilerplate assumes that index.php
is stored inside htdocs
:
htdocs/
├── assets
├── content
├── kirby
├── site
└── index.php
However, for a more secure setup (and some extra straightforwardness), the following structure is recommended:
htdocs/
├── content
├── kirby
├── public
│ ├── assets
│ ├── .htaccess
│ └── index.php
├── site
└── storage
├── accounts
├── cache
└── sessions
The webserver only exposes the public
directory, which contains assets
, index.php
and .htaccess
. For this to work, simply move some files around, update your index.php
(Gulp/Kirby StarterKit got your back) and docker-compose.yml
(just comment/uncomment some lines).
@rasteiner's k3-dockercompose-starterkit inspired this boilerplate - he deserves all the credit.
I'd like to thank everybody that's making great software - you people are awesome. Also I'm always thankful for feedback and bug reports :)