ckulka/baikal-docker

question: Automated setup

WhyNotHugo opened this issue · 2 comments

Is there some way to automate the initial setup of baikal?

I want to use this image for automated tests (e.g.: spinning up a server to test my caldav client against it). However, I can't find a way to configure it without going through the GUI wizard, but that approach is not really something that can easily be scripted.

I had a very large hack that did this for 0.8.0 (strongly based on this image), but that doesn't work with a new version since the data formats have changed.

Looks like Baikal supports a YAML config. You can probably pass this to the correct location within the folder.

https://github.com/sabre-io/Baikal/blob/master/config/baikal.yaml.dist

ckulka commented

@Skaronator is exactly right, that's also what I used to use.

If the YAML file isn't enough and you need to additionally runs scripts, then just FYI: both image variants (Apache httpd and nginx) execute init-scripts in /docker-entrypoint.d/*.sh before Nginx or Apache httpd are started.

The init-script in the Apache httpd image variant is borrowed from the base nginx image: https://github.com/ckulka/baikal-docker/blob/master/files/docker-entrypoint.sh

Here are the init scripts used by the Baikal images: https://github.com/ckulka/baikal-docker/tree/master/files/docker-entrypoint.d

Hope this helps!