Compare commits
3 Commits
98bfba6bfe
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
e780283e5b
|
|||
|
6876fb741c
|
|||
|
a4020c1f43
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -18,3 +18,4 @@ pnpm-lock.yaml
|
||||
*/target/
|
||||
*/**/*.rs.bk
|
||||
.claude
|
||||
.config
|
||||
|
||||
10
Dockerfile
10
Dockerfile
@@ -1,11 +1,5 @@
|
||||
FROM syui/aios
|
||||
|
||||
COPY ./target/release/aibot /usr/sbin/aibot
|
||||
|
||||
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"]
|
||||
|
||||
10
README.md
10
README.md
@@ -2,9 +2,9 @@
|
||||
|
||||
<img src="./icon/avatar.png" width="100">
|
||||
|
||||
- name : ai bot
|
||||
- base : [ai os](https://git.syui.ai/ai/os)
|
||||
- host : [yui.syui.ai](https://bsky.app/profile/yui.syui.ai), [ai.syu.is](https://web.syu.is/profile/ai.syu.is)
|
||||
- name : aibot
|
||||
- base : [aios](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)
|
||||
|
||||
```sh
|
||||
$ aibot
|
||||
@@ -28,14 +28,14 @@ $ aibot ai -t avatar
|
||||
### login
|
||||
|
||||
```sh
|
||||
# ai login $handle -p $password
|
||||
# aibot login $handle -p $password
|
||||
$ aibot l yui.syui.ai -p password
|
||||
|
||||
$ cat ~/.config/ai/token.toml
|
||||
```
|
||||
|
||||
```sh
|
||||
# ai l $handle -p $password -s $server
|
||||
# aibot l $handle -p $password -s $server
|
||||
$ aibot l ai.syu.is -p password -s syu.is
|
||||
```
|
||||
|
||||
|
||||
19
compose.yml
19
compose.yml
@@ -1,11 +1,16 @@
|
||||
services:
|
||||
aios:
|
||||
#image: syui/aios
|
||||
#command: aibot bot -a syui.syu.is
|
||||
bot:
|
||||
build:
|
||||
context: .
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
dockerfile: Dockerfile
|
||||
image: syui/aios:custom
|
||||
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"
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
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"
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/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}"
|
||||
Reference in New Issue
Block a user