From b0de0c9089e3992497fdf0a46b17d387a6af7122 Mon Sep 17 00:00:00 2001 From: syui Date: Wed, 21 Feb 2024 19:09:17 +0900 Subject: [PATCH] fix --- .gitignore | 1 + Dockerfile | 14 ++++++-------- compose.yml | 4 +++- test/cron.zsh | 2 +- test/entrypoint.sh | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) 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