-
Create a directory to store the configuration file and other data.
$ sudo mkdir -p /opt/container/kaleidos/data $ sudo wget -P /opt/container/kaleidos https://raw.githubusercontent.com/BioniCosmos/kaleidos/master/config.ts
-
Put the following into
/etc/systemd/system/container-kaleidos.service
.[Unit] Description=Podman container-kaleidos.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target RequiresMountsFor=%t/containers [Service] Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=70 ExecStartPre=/bin/rm \ -f %t/%n.ctr-id ExecStart=/usr/bin/podman run \ --cidfile=%t/%n.ctr-id \ --cgroups=no-conmon \ --rm \ --sdnotify=conmon \ --replace \ -d \ --name kaleidos \ -p 80:8000 \ -v /opt/container/kaleidos/config.ts:/app/config.ts \ -v /opt/container/kaleidos/data:/app/data \ ghcr.io/bionicosmos/kaleidos ExecStop=/usr/bin/podman stop \ --ignore -t 10 \ --cidfile=%t/%n.ctr-id ExecStopPost=/usr/bin/podman rm \ -f \ --ignore -t 10 \ --cidfile=%t/%n.ctr-id Type=notify NotifyAccess=all [Install] WantedBy=default.target
Note
This file is generated with podman generate systemd
.
-
Start the service.
$ sudo systemctl daemon-reload $ sudo systemctl --now enable container-kaleidos.service
-
Clone the repository to your server.
$ git clone https://github.com/BioniCosmos/kaleidos.git $ cd kaleidos $ git checkout v2.0.1
-
Modify the configuration file. (
config.ts
for Kaleidos andfresh.config.ts
for Fresh) -
Start Kaleidos.
$ deno run -A main.ts
-
Pull the latest image.
$ sudo podman pull ghcr.io/bionicosmos/kaleidos:latest
-
Run the migration script to update the database.
$ sudo podman run \ --rm \ -v /opt/container/kaleidos/config.ts:/app/config.ts \ -v /opt/container/kaleidos/data:/app/data \ kaleidos \ run -A migration.ts
-
Restart the container.
$ sudo systemctl restart container-kaleidos.service