1
0

add docker

This commit is contained in:
syui 2024-02-21 23:03:24 +09:00
parent 8c6be8273e
commit 04d9dec99d
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
4 changed files with 26 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,8 +1,6 @@
t t
.env .env
*.json *.json
*.sqlite
#*.zsh
tmp/card_limit.zsh tmp/card_limit.zsh
tmp/card_day.zsh tmp/card_day.zsh
tmp/card_delete.zsh tmp/card_delete.zsh

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM syui/aios
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
WORKDIR /app/data
RUN touch /app/data/new.sqlite
WORKDIR /app
ENTRYPOINT ["/app/api"]

0
app/data/new.sqlite Normal file
View File

11
compose.yml Normal file
View File

@ -0,0 +1,11 @@
services:
api:
ports:
- 8080:8080
build:
context: .
restart: always
env_file:
- .env
volumes:
- ./app/data:/app/data