Skip to content

Docker Compose

CasaVue is ment to be a index frontpage for applications hosted on a Kubernetes instance. Nevertheless, it can be run on Docker alone.

Dynamic discovery of items works only with Kubernetes. While running on plain Docker, items displayed on CasaVue may only be set using YAML configuration file.

Docker-compose file is available to ease the process of starting and configuring CasaVue.

Usage

Create a new directory in your workspace and download docker-compose.yaml file for CasaVue App:

Terminal window
mkdir CasaVue && cd CasaVue && \
curl https://casavue.app/docker-compose.yaml > docker-compose.yaml

Running main service

Starting service

Terminal window
docker compose up -d

Viewing and following logs

Terminal window
docker compose logs -f

Stoping service

Terminal window
docker compose down

Editing configuration

Configuration files with default content are created upon first application run in /app/config/ path inside container.

To edit main.yaml config file you would:

  1. Copy main.yaml file from container to local folder:
    Terminal window
    docker compose cp casavue:/app/config/main.yaml .
  2. Edit main.yaml file with your favourite editor.
  3. Copy main.yaml file back to container:
    Terminal window
    docker compose cp main.yaml casavue:/app/config/

Same procedure works for editing items.yaml file.

Static mode

For whatever reason should you want to render CasaVue dashboard to HTML static content (e.g. for hosting on GitHub Pages), you can use CasaVue static generation mode.

Generating static dashboard webpage:

Terminal window
docker compose run --rm static
docker compose cp casavue:/app/dist static

Directory dist should be created and contain generated static webpage. While being inside it, start HTTP server to test dashboard, for example:

Terminal window
cd static && \
python -m http.server 8001

There is more to choose from big list of http static server one-liners .

Compose file

For better understaning in case of advanced users, here is the content of CasaVue docker compose file:

docker-compose.yaml
services:
# main application
# run command:
# docker compose up
casavue:
image: ghcr.io/czoczo/casavue:0.1.2-distroless
ports:
- "8080:8080"
networks:
- casavue
volumes:
- casavue-config:/app/config
- casavue-dist:/app/dist
# enables generating static HTML+JS (Vue) dashboard page
# run command:
# docker compose run static
static:
image: ghcr.io/czoczo/casavue:0.1.2-distroless
command: "-static"
profiles:
- no-auto-start
volumes:
- casavue-config:/app/config
- casavue-dist:/app/dist
volumes:
casavue-config:
casavue-dist:
networks:
casavue: {}