基于 Vue 3 + Ruffle 的现代 Flash 游戏站点,支持几万款 SWF 游戏的自动扫描、分类和在线游玩。
💡 觉得好用? 去 GitHub 给个 ⭐ Star 支持一下!
docker run -d \
--name flash-games \
-p 3000:3000 \
-v $(pwd)/game:/app/game \
-v $(pwd)/data:/app/data \
--restart unless-stopped \
lookfuna666/flash-games:latest
创建 docker-compose.yml:
services:
flash-games:
image: lookfuna666/flash-games:latest
container_name: flash-games
ports:
- "3000:3000"
volumes:
- ./game:/app/game # SWF 游戏文件目录
- ./data:/app/data # SQLite 数据库持久化
restart: unless-stopped
# 创建游戏目录并放入 SWF 文件
mkdir game data
cp /path/to/your/*.swf ./game/
# 启动
docker-compose up -d
| 标签 | 说明 |
|---|---|
lookfuna666/flash-games:latest | 最新稳定版(推荐) |
lookfuna666/flash-games:1.0 | 大版本锁定 |
lookfuna666/flash-games:1.0.0 | 精确版本锁定 |
| 变量 | 默认值 | 说明 |
|---|---|---|
PORT | 3000 | 服务端口 |
GAME_DIR | /app/game | SWF 文件目录 |
DB_PATH | /app/data/flash.db | SQLite 数据库路径 |
CORS_ORIGINS | *(允许所有) | CORS 允许的来源,多个用逗号分隔 |
| 容器路径 | 说明 |
|---|---|
/app/game | 存放 .swf 文件,放入后自动扫描入库 |
/app/data | SQLite 数据库(用户配置、游戏索引、收藏等) |
# 1. 安装前端依赖
cd client && npm install
# 2. 安装后端依赖
cd ../server && npm install
# 3. 启动后端 (http://localhost:3000)
cd server && npm run dev
# 4. 新终端,启动前端 (http://localhost:5173)
cd client && npm run dev
vue-flash/
├── client/ # Vue 3 + Vite 前端
│ └── src/
│ ├── views/ # HomeView / GameView / AdminView
│ ├── components/ # LockScreen / GameCard / GamePlayer
│ ├── stores/ # Pinia (settings / games)
│ ├── api/ # axios 封装
│ └── styles/ # global.css
├── server/ # Express 后端
│ └── src/
│ ├── index.js # 服务入口
│ ├── db.js # SQLite 数据库
│ ├── scanner.js # 游戏目录扫描 + 监听
│ ├── routes/ # games / admin API
│ └── middleware/ # 认证中间件
├── game/ # SWF 文件目录 (volume 挂载)
├── data/ # SQLite 持久化 (volume 挂载)
├── Dockerfile
└── docker-compose.yml
项目采用首次安装引导方式,不存在硬编码密码:
⚠️ 首次启动系统时,会自动跳转到安装页面
/setup,由你自行设置:
- 管理员账号和密码(用于登录
/admin管理后台)- 前端锁开关和密码(开启后访客需输入密码才能浏览游戏)
管理员登录后可在后台随时修改前端锁的开关状态和密码。
访问 /admin 路径,使用 JWT Token 鉴权(24小时有效期)。
功能:
| 层级 | 技术 |
|---|---|
| 前端 | Vue 3 + Vite + Element Plus + Pinia + Vue Router |
| Flash 引擎 | Ruffle (自托管 WASM) |
| 后端 | Express.js |
| 数据库 | SQLite (sql.js, 纯 WASM 无需编译) |
| 部署 | Docker / Docker Compose |
Content type
Image
Digest
sha256:266e21a9c…
Size
97.6 MB
Last updated
3 months ago
docker pull lookfuna666/flash-games