Compare commits

..

1 Commits

Author SHA1 Message Date
3910cf754c fix docker
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
2025-12-13 10:37:22 +09:00
6 changed files with 48 additions and 20 deletions

1
.gitignore vendored
View File

@@ -18,4 +18,3 @@ pnpm-lock.yaml
*/target/ */target/
*/**/*.rs.bk */**/*.rs.bk
.claude .claude
.config

View File

@@ -1,5 +1,11 @@
FROM syui/aios FROM syui/aios
COPY ./target/release/aibot /usr/sbin/aibot
WORKDIR /root WORKDIR /root
COPY ./test/entrypoint.sh /root/entrypoint.sh
RUN chmod +x /root/entrypoint.sh
ENV ADMIN=""
ENV HOST="bsky.social"
ENTRYPOINT ["/root/entrypoint.sh"]

View File

@@ -4,7 +4,7 @@
- name : ai bot - name : ai bot
- base : [ai os](https://git.syui.ai/ai/os) - base : [ai os](https://git.syui.ai/ai/os)
- host : [yui.syui.ai](https://bsky.app/profile/yui.syui.ai), [ai.syu.is](https://syu.is/profile/did:plc:6qyecktefllvenje24fcxnie) - host : [yui.syui.ai](https://bsky.app/profile/yui.syui.ai), [ai.syu.is](https://web.syu.is/profile/ai.syu.is)
```sh ```sh
$ aibot $ aibot
@@ -28,14 +28,14 @@ $ aibot ai -t avatar
### login ### login
```sh ```sh
# aibot login $handle -p $password # ai login $handle -p $password
$ aibot l yui.syui.ai -p password $ aibot l yui.syui.ai -p password
$ cat ~/.config/ai/token.toml $ cat ~/.config/ai/token.toml
``` ```
```sh ```sh
# aibot l $handle -p $password -s $server # ai l $handle -p $password -s $server
$ aibot l ai.syu.is -p password -s syu.is $ aibot l ai.syu.is -p password -s syu.is
``` ```

View File

@@ -1,16 +1,11 @@
services: services:
bot: aios:
#image: syui/aios
#command: aibot bot -a syui.syu.is
build: build:
context: . context: .
dockerfile: Dockerfile restart: always
image: syui/aios:custom env_file:
container_name: aibot - .env
restart: unless-stopped
command: ["aibot", "bot", "-a", "${ADMIN:-syui.ai}"]
volumes: volumes:
- ./.config/syui/ai/bot:/root/.config/syui/ai/bot - ./.config:/root/.config
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"

13
docker-compose.yml Normal file
View File

@@ -0,0 +1,13 @@
services:
bot:
image: syui/aios
container_name: aibot
restart: unless-stopped
command: ["aibot", "bot", "-a", "${ADMIN:-syui.ai}"]
volumes:
- ~/.config/syui/ai/bot:/root/.config/syui/ai/bot
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"

15
test/entrypoint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/zsh
set -e
echo "Starting aibot..."
echo "ADMIN: ${ADMIN:-not set}"
echo "HOST: ${HOST:-bsky.social}"
# 設定ファイルの存在確認
if [ ! -f ~/.config/syui/ai/bot/token.toml ]; then
echo "Warning: token.toml not found. Please login first."
fi
# botを起動
exec aibot bot -a "${ADMIN}"