chore(reasonix): add Dockerfile, .dockerignore, refine compose.yml
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
data/
|
||||
.env
|
||||
.env.example
|
||||
.git
|
||||
.gitignore
|
||||
*.md
|
||||
@@ -0,0 +1,17 @@
|
||||
FROM node:alpine AS build
|
||||
|
||||
RUN npm install -g reasonix@1.17.10
|
||||
|
||||
FROM node:alpine
|
||||
|
||||
COPY --from=build /usr/local/lib/node_modules /usr/local/lib/node_modules
|
||||
COPY --from=build /usr/local/bin/reasonix /usr/local/bin/reasonix
|
||||
|
||||
RUN addgroup -S reasonix && adduser -S reasonix -G reasonix
|
||||
|
||||
USER reasonix
|
||||
WORKDIR /home/reasonix
|
||||
|
||||
EXPOSE 8787
|
||||
|
||||
ENTRYPOINT ["reasonix", "serve", "--addr", "0.0.0.0:8787", "--auth", "none"]
|
||||
@@ -1,6 +1,9 @@
|
||||
services:
|
||||
reasonix:
|
||||
image: node:alpine
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: reasonix:latest
|
||||
container_name: reasonix
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
@@ -11,18 +14,10 @@ services:
|
||||
- DEEPSEEK_LOCAL_API_KEY=${DEEPSEEK_LOCAL_API_KEY}
|
||||
- TZ=Asia/Shanghai
|
||||
volumes:
|
||||
- ./reasonix.toml:/home/node/.reasonix/config.toml:ro
|
||||
- ./data:/home/node/.reasonix
|
||||
- ./reasonix.toml:/home/reasonix/.reasonix/config.toml:ro
|
||||
- ./data:/home/reasonix/.reasonix
|
||||
networks:
|
||||
- nas-dashboard_internal
|
||||
working_dir: /home/node
|
||||
user: node
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
npm install -g reasonix@1.17.10
|
||||
reasonix serve --addr 0.0.0.0:8787 --auth none
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8787"]
|
||||
interval: 30s
|
||||
|
||||
Reference in New Issue
Block a user