Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: node_js
node_js:
- "node"
- "lts/*"
- "9"
- "8"

services:
Expand Down
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
FROM node:8
FROM node:alpine

WORKDIR /usr/src/app

RUN apk add --no-cache make gcc g++ python tzdata && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone && \
apk del tzdata

ADD ./index.js ./tsconfig.json ./jsconfig.json ./package.json /usr/src/app/

# --registry=https://registry.npm.taobao.org
RUN npm install
RUN npm set progress=false && npm install --no-progress

ADD ./src /usr/src/app/src
ADD ./config /usr/src/app/config

RUN npm run tsc && \
rm -rf node_modules && \
npm install --production && \
npm install cross-env tsconfig-paths --save-dev && \
npm prune --production && \
npm install cross-env tsconfig-paths typescript tslib --save-dev && \
npm install pm2 --global && \
npm cache clean -f
npm cache clean -f && \
rm -rf ./package-lock.json

CMD pm2 start index.js --node-args="-r tsconfig-paths/register" -i 0 --no-daemon
# CMD [ "npm", "run", "start:prod" ]
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# Store Box
# StoreBox-Api

Store PandoraBox Firmware Images and its packages

[![Travis](https://img.shields.io/travis/BoxSystem/StoreBox-Api.svg?style=flat-square)](https://travis-ci.org/BoxSystem/StoreBox-Api)
[![Travis](https://img.shields.io/travis/BoxSystem/StoreBox-Api.svg?style=flat-square&logo=travis)](https://travis-ci.org/BoxSystem/StoreBox-Api)
[![Coveralls](https://img.shields.io/coveralls/github/BoxSystem/StoreBox-Api.svg?style=flat-square)](https://coveralls.io/github/BoxSystem/StoreBox-Api)
[![Known Vulnerabilities](https://snyk.io/test/github/BoxSystem/StoreBox-Api/badge.svg?style=flat-square)](https://snyk.io/test/github/BoxSystem/StoreBox-Api)
[![license](https://img.shields.io/github/license/BoxSystem/StoreBox-Api.svg?style=flat-square)](https://github.com/BoxSystem/StoreBox-Api)
[![TypeScript](https://img.shields.io/badge/Language-Typescript-blue.svg?style=flat-square&maxAge=7200)](http://www.typescriptlang.org/)
[![license](https://img.shields.io/github/license/BoxSystem/StoreBox-Api.svg?style=flat-square&maxAge=7200)](https://github.com/BoxSystem/StoreBox-Api)

# Usage

## Docker Edition

```bash
docker pull arylo/storebox
docker run -p 9000:9000 arylo/storebox
docker pull arylo/storebox-api
docker run -p 9000:9000 arylo/storebox-api
```

or

```bash
docker build -t arylo/storebox .
docker run -p 9000:9000 arylo/storebox
docker build -t arylo/storebox-api .
docker run -p 9000:9000 arylo/storebox-api
```

### Docker-compose
Expand Down
8 changes: 5 additions & 3 deletions TODOLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
- [x] 上传到指定Categroy
- [x] 上传时追加Catogroy
- [x] 整顿collectin info的goods 列表
- [ ] Token 使用日志显示
- [ ] Good 下载次数统计
- [ ] 接入统计
- [ ] 统计
- [ ] Token 使用日志显示
- [ ] 用户登录记录
- [x] Good 下载次数统计
- [ ] 接入统计
- [x] 配置文件写入初始化用户账号密码
- [ ] 接入AuthBox
- [x] Redis 接入
Expand Down
Loading