Skip to content
This repository was archived by the owner on Dec 18, 2023. It is now read-only.

Commit be16622

Browse files
committed
配置替换恢复到entrypoint内,是配置调整生效
1 parent 4e3c630 commit be16622

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Dockerfile

+1-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ COPY entrypoint.sh /bin
1414
COPY config.json ${HOME}
1515
COPY wait-for-it.sh /
1616

17-
RUN sed -i "s/3000/"${PORT}"/g" ${HOME}/config.json && \
18-
sed -i "s/[email protected]/"${ADMIN_EMAIL}"/g" ${HOME}/config.json && \
19-
sed -i "s/mongo/"${DB_SERVER}"/g" ${HOME}/config.json && \
20-
sed -i "s/yapi/"${DB_NAME}"/g" ${HOME}/config.json && \
21-
sed -i "s/27017/"${DB_PORT}"/g" ${HOME}/config.json && \
22-
npm config set registry https://registry.npmmirror.com && \
17+
RUN npm config set registry https://registry.npmmirror.com && \
2318
npm install -g yapi-cli && \
2419
npm cache clean --force
2520

entrypoint.sh

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#! /bin/sh
22
if [ ! -e "init.lock" ]
33
then
4+
sed -i "s/3000/"${PORT}"/g" ${HOME}/config.json
5+
sed -i "s/[email protected]/"${ADMIN_EMAIL}"/g" ${HOME}/config.json
6+
sed -i "s/mongo/"${DB_SERVER}"/g" ${HOME}/config.json
7+
sed -i "s/yapi/"${DB_NAME}"/g" ${HOME}/config.json
8+
sed -i "s/27017/"${DB_PORT}"/g" ${HOME}/config.json
49
yapi install -v ${VERSION}
510
touch init.lock
611
fi

0 commit comments

Comments
 (0)