docker-added
This commit is contained in:
9
.dockerignore
Normal file
9
.dockerignore
Normal file
@@ -0,0 +1,9 @@
|
||||
node_modules/
|
||||
data/
|
||||
.git/
|
||||
.wolf/
|
||||
.gitignore
|
||||
.dockerignore
|
||||
*.bat
|
||||
*.sh
|
||||
README.md
|
||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY server.js ./
|
||||
COPY vps_manager.html ./
|
||||
|
||||
EXPOSE 8095
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
31
README.md
31
README.md
@@ -47,6 +47,37 @@ Open `http://localhost:8095` in your browser.
|
||||
|
||||
---
|
||||
|
||||
## Docker
|
||||
|
||||
**One command — no Node.js install required.**
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Open `http://localhost:8095` in your browser. Server data is persisted in `./data/` on the host via a bind mount, so it survives container restarts and rebuilds.
|
||||
|
||||
To stop:
|
||||
|
||||
```bash
|
||||
docker compose down
|
||||
```
|
||||
|
||||
To rebuild after pulling changes:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
To run without Compose (manual):
|
||||
|
||||
```bash
|
||||
docker build -t vps-fleet .
|
||||
docker run -d -p 8095:8095 -v "$(pwd)/data:/app/data" --name vps-fleet vps-fleet
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
**Add a server** — click **+ Add Server** in the top-right corner. Only the hostname is required; all other fields are optional. Enter a location and a map pin is placed automatically.
|
||||
|
||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
vps-fleet:
|
||||
build: .
|
||||
ports:
|
||||
- "8095:8095"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user