Add openclaw control center as arion service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
671f7b5117
commit
26d4bcc857
3 changed files with 51 additions and 0 deletions
45
nixos/arion-openclaw/arion-compose.nix
Normal file
45
nixos/arion-openclaw/arion-compose.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
project.name = "openclaw";
|
||||
|
||||
networks.openclaw.external = false;
|
||||
|
||||
services = {
|
||||
app = {
|
||||
service = {
|
||||
image = "node:lts-alpine";
|
||||
container_name = "openclaw";
|
||||
restart = "unless-stopped";
|
||||
networks = [ "openclaw" ];
|
||||
volumes = [
|
||||
"/var/openclaw/app:/app"
|
||||
"/root/.openclaw:/root/.openclaw:ro"
|
||||
];
|
||||
ports = [ "127.0.0.1:4310:4310" ];
|
||||
environment = {
|
||||
PORT = "4310";
|
||||
OPENCLAW_HOME = "/root/.openclaw";
|
||||
};
|
||||
command = [
|
||||
"sh" "-c"
|
||||
''
|
||||
set -e
|
||||
apk add --no-cache git
|
||||
if [ ! -d /app/repo ]; then
|
||||
git clone https://github.com/TianyiDataScience/openclaw-control-center.git /app/repo
|
||||
fi
|
||||
cd /app/repo
|
||||
if [ ! -f .env ]; then
|
||||
cp .env.example .env
|
||||
sed -i "s|OPENCLAW_HOME=.*|OPENCLAW_HOME=/root/.openclaw|" .env
|
||||
sed -i "s|PORT=.*|PORT=4310|" .env
|
||||
fi
|
||||
npm install
|
||||
npm run build
|
||||
exec npm run dev:ui
|
||||
''
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
3
nixos/arion-openclaw/arion-pkgs.nix
Normal file
3
nixos/arion-openclaw/arion-pkgs.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import <nixpkgs> {
|
||||
system = "x86_64-linux";
|
||||
}
|
||||
|
|
@ -175,6 +175,7 @@ in {
|
|||
projects.riverside.settings = import ./arion-riverside/arion-compose.nix;
|
||||
projects.pluto.settings = import ./arion-pluto/arion-compose.nix;
|
||||
projects.paperless.settings = import ./arion-paperless/arion-compose.nix;
|
||||
projects.openclaw.settings = import ./arion-openclaw/arion-compose.nix;
|
||||
};
|
||||
|
||||
# The arion NixOS module sets backend = "podman-socket" but doesn't inject
|
||||
|
|
@ -184,6 +185,7 @@ in {
|
|||
systemd.services.arion-riverside.environment.DOCKER_HOST = "unix:///run/podman/podman.sock";
|
||||
systemd.services.arion-pluto.environment.DOCKER_HOST = "unix:///run/podman/podman.sock";
|
||||
systemd.services.arion-paperless.environment.DOCKER_HOST = "unix:///run/podman/podman.sock";
|
||||
systemd.services.arion-openclaw.environment.DOCKER_HOST = "unix:///run/podman/podman.sock";
|
||||
|
||||
# Build the VNC desktop image locally from the Dockerfile — no registry push/pull needed.
|
||||
# vncContext is a Nix store path that changes whenever any file under vnc-desktop/ changes,
|
||||
|
|
@ -259,6 +261,7 @@ in {
|
|||
"d /var/paperless/consume 0755 root root"
|
||||
"d /var/paperless/postgres 0755 root root"
|
||||
"d /var/paperless/redis 0755 root root"
|
||||
"d /var/openclaw/app 0755 root root"
|
||||
"d /var/riverside/files 0755 root root"
|
||||
"d /var/riverside/postgres 0755 root root"
|
||||
"d /var/lib/gitea-runner/ubuntu 0755 gitea-runner gitea-runner"
|
||||
|
|
|
|||
Loading…
Reference in a new issue