Skip to content

Commit

Permalink
udpate dockfile and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
unilei-github committed May 20, 2024
1 parent 92d382d commit 9eac105
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 26 deletions.
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
FROM node:alpine AS builder
FROM ubuntu:latest
LABEL authors="Lei"

WORKDIR /app
FROM node:18.17.1-alpine

ADD . .
WORKDIR /app

RUN npm install -g pnpm
RUN pnpm install && pnpm build
COPY package*.json ./

WORKDIR /app
RUN npm install
RUN npm run build

CMD pnpm run dev
COPY . .

EXPOSE 3001

# Set NuxtJS system variables so the application can be reached on your network
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3001

CMD [ "npm", "run", "start" ]
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@

## 快速开始

### docker执行
### 在 Vercel 上部署
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/unilei/aipan-netdisk-search.git&project-name=aipan-netdisk-search&repository-name=aipan-netdisk-search)

### 在 Vercel 上手动部署 操作方法

```
1. fork 本项目
2. 在 [Vercel] 官网点击 [New Project]
3. 点击 [Import Git Repository] 并选择你 fork 的此项目并点击 [import]
4. 然后直接点 [Deploy] 接着等部署完成即可
```

### Docker执行

#### docker cli

Expand All @@ -27,7 +39,7 @@ docker run -p 3001:3001 unilei/aipan-netdisk-search:latest
docker stop unilei/aipan-netdisk-search:latest
```

#### docker-compose
#### Docker-compose

##### 编译

Expand All @@ -46,19 +58,6 @@ docker compose up -d
docker compose down
```


### 在 Vercel 上部署
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/unilei/aipan-netdisk-search.git&project-name=aipan-netdisk-search&repository-name=aipan-netdisk-search)

### 在 Vercel 上手动部署 操作方法

```
1. fork 本项目
2. 在 [Vercel] 官网点击 [New Project]
3. 点击 [Import Git Repository] 并选择你 fork 的此项目并点击 [import]
4. 然后直接点 [Deploy] 接着等部署完成即可
```

### 1. 克隆项目

```bash
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yaml → docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
container_name: aipan-netdisk-search-app
restart: always
build:
context: .
dockerfile: Dockerfile
context: .
dockerfile: Dockerfile
ports:
- "3001:3001"
- "3001:3001"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "nuxt dev --port 3001",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
"postinstall": "nuxt prepare",
"start": "node .output/server/index.mjs"
},
"devDependencies": {
"@element-plus/nuxt": "^1.0.7",
Expand Down

0 comments on commit 9eac105

Please sign in to comment.