The challenge was make the deployment reproducible and easy
We opted to use Docker
we choose docker because
thanks to Docker Compose the configuration can be expressed in a single YAML file
github.com/k-box/k-box/blob/master/docker-compose.example.yml
version: '2'
networks:
internal:
services:
## The Search Engine service
engine:
image: "docker.klink.asia/../images/k-search-engine:0.4.2"
volumes:
- "./storage/index:/opt/solr/k-search/k-search/data"
expose:
- "8983"
networks:
- internal
## The Search Engine API
ksearch:
image: "docker.klink.asia/../images/k-search:3.2.1-1"
depends_on:
- engine
networks:
internal:
## The database
database:
image: mariadb:10
networks:
- internal
volumes:
- "./storage/database:/var/lib/mysql"
## The K-Box container
kbox:
image: "docker.klink.asia/../images/k-box:0.21.0"
depends_on:
- ksearch
- database
volumes:
- "./storage/data:/var/www/dms/storage"
ports:
- "8080:80"
networks:
- internal
docker-compose logs [--follow] kbox
docker-compose exec kbox ls storage/logs
docker-compose exec kbox bash
php artisan tinker
A new version, 0.21.1, of the K-Box is released
## docker-compose.yml
## The K-Box container
kbox:
image: "docker.klink.asia/../images/k-box:0.21.1"
depends_on:
docker-compose stop && docker-compose up -d
95% of the releases requires 2-4 minutes for the upgrade*
*Download time excluded
Search related upgrades might require extra steps
docker-compose exec kbox php artisan dms:reindex