add docker
This commit is contained in:
parent
8c6be8273e
commit
d2dbeb56fb
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,7 +2,6 @@ t
|
||||
.env
|
||||
*.json
|
||||
*.sqlite
|
||||
#*.zsh
|
||||
tmp/card_limit.zsh
|
||||
tmp/card_day.zsh
|
||||
tmp/card_delete.zsh
|
||||
|
15
Dockerfile
Normal file
15
Dockerfile
Normal 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/keep
Normal file
0
app/data/keep
Normal file
11
compose.yml
Normal file
11
compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
services:
|
||||
api:
|
||||
ports:
|
||||
- 8080:8080
|
||||
build:
|
||||
context: .
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./app/data:/app/data
|
Loading…
Reference in New Issue
Block a user