Skip to content

Commit 433e4f7

Browse files
committed
更新docker
1 parent fffb8f5 commit 433e4f7

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositorie
3232

3333
# 下载项目
3434
RUN cd /home && \
35-
git clone --depth=1 "${gitUrl}" metaweblog-api
35+
git clone --depth=1 "${gitUrl}" metaweblog-api && \
36+
cd metaweblog-api && chmod +x entrypoint.sh
3637

3738
# 编译项目
3839
RUN cd /home/metaweblog-api && \

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,29 @@ The `pages/api` directory is mapped to `/api/*`. Files in this directory are tre
4848

4949
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
5050

51+
## Docker
52+
53+
docker:
54+
55+
```bash
56+
docker run -itd --name=metaweblog-api -p 6333:3000 -e TZ=Asia/Shanghai --restart=unless-stopped nn200433/metaweblog-api:latest
57+
```
58+
59+
docker-compose:
60+
61+
```yaml
62+
version: '3'
63+
services:
64+
metaweblog-api:
65+
image: nn200433/metaweblog-api:latest
66+
container_name: metaweblog-api
67+
restart: unless-stopped
68+
ports:
69+
- 6333:3000
70+
environment:
71+
- TZ=Asia/Shanghai
72+
```
73+
5174
## Learn More
5275
5376
To learn more about Next.js, take a look at the following resources:

0 commit comments

Comments
 (0)