Skip to content
Thord Setsaas edited this page May 1, 2020 · 4 revisions

Docker is a easy way to get everything up and running quick.

Images

Images are available at DockerHub. Most are built with support for multiple platforms, linux/arm, linux/arm64, and linux/amd64 to allow running on alternative platforms such as Raspberry Pi

Docker Compose

A docker-compose file containing everything required to run can be found in the services repository

Initialize

Before running the first time the database image must be initialized. When running an empty linuxserver/mariadb, it will do multiple starts and stops to initialize the /config and /var/lib/mysql directories.

To initialize the database, run the following command, and wait until intialization is finished, then kill it with CTRL+C

docker-compose -p kcapp run --rm db

# wait for initialization to finish ...
# stop container with CTRL+C
^C

Troubleshooting

docker-compose will create multiple volumes where data is stored between runs

$ docker volume ls
DRIVER              VOLUME NAME
local               kcapp_db
local               kcapp_db_config

If something goes wrong during database setup and you need to start over, simply delete the volumes

docker volume rm kcapp_db kcapp_db_config

Running

Note: Make sure to Initialize the database

To run all required services

docker-compose -p kcapp up -d

You might also want to set the KCAPP_API environment variable to allow access to the API from outside.

# Set via shell
export KCAPP_API=http://localhost:8001

# or set directly when starting
KCAPP_API=http://localhost:8001 docker-compose -p kcapp up -d

# or change value in .env file

See Configuration section for other options that can be changed via environment variables

Stopping

To stop the running services

docker-compose -p kcapp down

Version

To run a specific version of the API and Frontend set KCAPP_FRONTEND_VERSION and KCAPP_API_VERSION variables in .env to the required versions

Clone this wiki locally