diff --git a/.gitignore b/.gitignore index b973d2e..784ebc7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ scpt/json/ .config/ai/txt .config/ai/png .ssh +.env diff --git a/Dockerfile b/Dockerfile index 9e5e490..df71fd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,8 @@ FROM syui/aios ADD .ssh /root/.ssh -#USER root -#ADD .config /root/.config -#WORKDIR /root -# -#ADD ./test/entrypoint.sh / -#RUN chmod +x /entrypoint.sh -# -#ENTRYPOINT ["/entrypoint.sh"] + +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 fe07c49..2d6c159 100644 --- a/compose.yml +++ b/compose.yml @@ -1,9 +1,11 @@ services: aios: #image: syui/aios + #command: ai bot -a syui.syu.is build: context: . restart: always + env_file: + - .env volumes: - ./.config:/root/.config - command: ai bot diff --git a/test/cron.zsh b/test/cron.zsh index 43e99c4..e9f389a 100644 --- a/test/cron.zsh +++ b/test/cron.zsh @@ -1,5 +1,5 @@ function cron() { - t=`docker ps |grep "ai bot"` + t=`docker ps |grep aios|grep Up` if [ -z "$t" ];then docker compose up -d fi diff --git a/test/entrypoint.sh b/test/entrypoint.sh index 5fc4448..3255c1b 100644 --- a/test/entrypoint.sh +++ b/test/entrypoint.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/zsh -exec "$@" +ai l $HANDLE -p $PASSWORD -s $HOST && ai bot -s $HOST