From 34cff7f52ae3423be4bd530aeff11028ae4cccf0 Mon Sep 17 00:00:00 2001 From: syui Date: Sat, 13 Dec 2025 10:36:44 +0900 Subject: [PATCH] fix docker --- .env.example | 5 +++++ .gitignore | 1 + Dockerfile | 7 ------- compose.yml | 20 +++++++++++--------- test/entrypoint.sh | 4 ---- 5 files changed, 17 insertions(+), 20 deletions(-) create mode 100644 .env.example delete mode 100644 Dockerfile delete mode 100644 test/entrypoint.sh diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..5977d24 --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +# Admin handle (bot will respond to admin commands from this user) +ADMIN=syui.ai + +# Bluesky host (optional, default: bsky.social) +HOST=syu.is diff --git a/.gitignore b/.gitignore index ac28386..ed44237 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ pnpm-lock.yaml */target/ */**/*.rs.bk .claude +.config diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 930c1af..0000000 --- a/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM syui/aios - -WORKDIR /root -ADD ./test/entrypoint.sh . -RUN chmod +x /root/entrypoint.sh - -ENTRYPOINT ["/root/entrypoint.sh"] diff --git a/compose.yml b/compose.yml index 43fba25..d1f05ba 100644 --- a/compose.yml +++ b/compose.yml @@ -1,11 +1,13 @@ services: - aios: - #image: syui/aios - #command: aibot bot -a syui.syu.is - build: - context: . - restart: always - env_file: - - .env + bot: + image: syui/aios + container_name: aibot + restart: unless-stopped + command: ["aibot", "bot", "-a", "${ADMIN:-syui.ai}"] volumes: - - ./.config:/root/.config + - ./.config/syui/ai/bot:/root/.config/syui/ai/bot + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" diff --git a/test/entrypoint.sh b/test/entrypoint.sh deleted file mode 100644 index ad0a7aa..0000000 --- a/test/entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/zsh - -#aibot l $HANDLE -p $PASSWORD -s $HOST -aibot bot -a $ADMIN