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:
|
services:
|
||||||
reasonix:
|
reasonix:
|
||||||
image: node:alpine
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: reasonix:latest
|
||||||
container_name: reasonix
|
container_name: reasonix
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
labels:
|
labels:
|
||||||
@@ -11,18 +14,10 @@ services:
|
|||||||
- DEEPSEEK_LOCAL_API_KEY=${DEEPSEEK_LOCAL_API_KEY}
|
- DEEPSEEK_LOCAL_API_KEY=${DEEPSEEK_LOCAL_API_KEY}
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
volumes:
|
volumes:
|
||||||
- ./reasonix.toml:/home/node/.reasonix/config.toml:ro
|
- ./reasonix.toml:/home/reasonix/.reasonix/config.toml:ro
|
||||||
- ./data:/home/node/.reasonix
|
- ./data:/home/reasonix/.reasonix
|
||||||
networks:
|
networks:
|
||||||
- nas-dashboard_internal
|
- 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:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8787"]
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8787"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
|||||||
Reference in New Issue
Block a user