Skip to content

Commit 38fb3a4

Browse files
author
brad
committed
up yapi
1 parent e7282b0 commit 38fb3a4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

yapi/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ RUN chmod +x /entrypoint.sh \
1010

1111
RUN apk update && apk add mongodb=3.4.4-r0 nodejs npm
1212

13+
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
14+
1315
WORKDIR /yapi-src
1416

1517
ADD https://github.com/YMFE/yapi/archive/refs/tags/v${YAPI_VERSION}.tar.gz /yapi-src
1618

1719
RUN tar -zxf v${YAPI_VERSION}.tar.gz && rm v${YAPI_VERSION}.tar.gz && mv yapi-${YAPI_VERSION} vendors
1820

19-
RUN cd /yapi-src/vendors && npm install --production --registry https://registry.npm.taobao.org
21+
RUN cd /yapi-src/vendors && cnpm install --production && cnpm cache clean --force
2022

2123
RUN cd /yapi-src && tar -zcf vendors.tar.gz vendors && rm -rf vendors
2224

yapi/conf/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"port": "3000",
3-
"adminAccount": "admin@anoyi.com",
3+
"adminAccount": "admin@admin.com",
44
"timeout":120000,
55
"db": {
66
"servername": "127.0.0.1",

yapi/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tar -zxf /yapi-src/vendors.tar.gz -C /yapi
77

88
if [ ! -f "/yapi/init.lock" ]; then
99
tar -zxf /yapi-src/vendors.tar.gz -C /yapi
10-
cd /yapi/vendors && npm run install-server
10+
cd /yapi/vendors && cnpm run install-server
1111
fi
1212

1313
exec "$@"

0 commit comments

Comments
 (0)