docker-added

This commit is contained in:
2026-06-04 13:03:26 -04:00
parent 8dbf7b02e7
commit 60a5fe9687
4 changed files with 61 additions and 0 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
node_modules/
data/
.git/
.wolf/
.gitignore
.dockerignore
*.bat
*.sh
README.md

13
Dockerfile Normal file
View 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"]

View File

@@ -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
View File

@@ -0,0 +1,8 @@
services:
vps-fleet:
build: .
ports:
- "8095:8095"
volumes:
- ./data:/app/data
restart: unless-stopped