Docker Compose Questions


#1

I was able to get Kanboard up and running on my Mac by using the docker-compose up command. I’m a little confused however about where all the files really exist (plugins, data etc)

I looked in the docker folder under kanboard/docker/var/www/app and there is just a three-line config.php file

There was nothing under the kanboard/plugins folder despite installing several plugins. There was also nothing under the kanboard/data folder save a small web.config file

  • Can someone please point me to where all my project data resides please?

  • How would I go about updating to a newer version of Kanboard

… provided and I want to maintain my old data, configs and plugins? I looked at the upgrade instructions documentation but there was no mention of how to do this with docker and the folders they mentioned are the ones I can’t find.


#2

var/www/app/data
var/www/app/plugins

Your files are in those two folders.

Either bind those two folders or make them volumes, and when you build an upgraded container, you will simply bind back to those.

Config.php with only three lines is fine. If you need to set anything else, open config.defaullt.php and copy the lines you need, whatever else you don’t need will default.


#3

But I don’t have a /var/www/app/data nor a /var/www/app/plugins directory on my Mac. I also don’t have them in the git clone I made of kanboard. See the tree view of the docker folder within the git project:

[~/git/kanboard] $tree docker
docker
├── etc
│   ├── crontabs
│   │   └── nginx
│   ├── nginx
│   │   └── nginx.conf
│   ├── php7
│   │   ├── conf.d
│   │   │   └── local.ini
│   │   ├── php-fpm.conf
│   │   └── php-fpm.d
│   │       └── env.conf
│   └── services.d
│       ├── cron
│       │   └── run
│       ├── nginx
│       │   └── run
│       └── php
│           └── run
├── usr
│   └── local
│       └── bin
│           └── entrypoint.sh
└── var
    └── www
        └── app
            └── config.php

I don’t see any app data or plugin data. Do I need to be looking somewhere else? Like in the running docker instance?


#4

Never mind. I was able to connect to my docker instance using:

docker exec -it <CONTAINER_NAME> /bin/bash

and found everything in there. In case anyone else was looking for it, the database is located here:

 /var/www/app/data/db.sqlite

#5

in order for those folders to appear on your host, you would need to bind them.


#6

the directory structure above seems to match the directory structure from the kanboard GitHub repository, used to build the image. the structure is not from the running container. As creecros said, in order for the actual directory to appear on your host and to have a persistent copy when you want to updated to a newer image, you need to bind them (or use docker volumes)