1
0

update docker

This commit is contained in:
2025-07-20 12:21:09 +09:00
parent 9222892c61
commit a4a090b234
4 changed files with 18 additions and 14 deletions

1
.gitignore vendored
View File

@@ -11,3 +11,4 @@ api
node_modules
*.lock
target
app/data

View File

@@ -1,14 +1,8 @@
FROM syui/aios
FROM archlinux
RUN pacman -Syu --noconfirm go
WORKDIR /app
RUN git clone https://git.syui.ai/ai/api tmp
WORKDIR /app/tmp
RUN go build
RUN mv api /app/api
#ADD ./app /app
#RUN pacman -Syu --noconfirm
WORKDIR /app
COPY api /app/
ENTRYPOINT ["/app/api"]

View File

@@ -4,8 +4,12 @@ d=${0:a:h}
cd $d
su=10000
go1.21.8 generate ./...
#go generate ./...
#PASS=`cat $f|jq -r .password` TOKEN=`cat $f|jq -r .token` go run -mod=mod main.go
cp -rf $d/ent/openapi.json $d/tmp/
case $OSTYPE in
@@ -20,6 +24,11 @@ case $OSTYPE in
esac
cp -rf $d/tmp/ogent ent/
#f=~/.config/ai/api_card.json
#PASS=`cat $f|jq -r .password` TOKEN=`cat $f|jq -r .token` go build
#PASS=`cat $f|jq -r .password` TOKEN=`cat $f|jq -r .token` go run -mod=mod main.go
f=~/.config/ai/api_card.json
if [ -f ./.env ];then
rm .env
fi
echo PASS=`cat ~/.config/ai/api_card.json|jq -r .password` >> .env
echo TOKEN=`cat ~/.config/ai/api_card.json|jq -r .token` >> .env
PASS=`cat $f|jq -r .password` TOKEN=`cat $f|jq -r .token` go build

View File

@@ -1,7 +1,7 @@
services:
api:
ports:
- 8080:8080
- 8188:8080
build:
context: .
restart: always