Spaces:
Running
Running
orztv
commited on
Commit
•
de752c1
1
Parent(s):
cbbefdc
update
Browse files- Dockerfile +2 -3
Dockerfile
CHANGED
@@ -27,12 +27,11 @@ COPY --from=build /app/.git /app/.git
|
|
27 |
# 复制.env.example并重命名为.env
|
28 |
COPY .env.example .env
|
29 |
|
30 |
-
# 如果ARG有值,则替换.env文件中的相应值
|
31 |
RUN if [ -n "$API_URL" ]; then \
|
32 |
-
sed -i "s|^API_URL=.*|API_URL=$API_URL|" .env; \
|
33 |
fi && \
|
34 |
if [ -n "$API_PORT" ]; then \
|
35 |
-
sed -i "s|^API_PORT=.*|API_PORT=$API_PORT|" .env; \
|
36 |
fi
|
37 |
|
38 |
# 输出.env文件内容以进行调试
|
|
|
27 |
# 复制.env.example并重命名为.env
|
28 |
COPY .env.example .env
|
29 |
|
|
|
30 |
RUN if [ -n "$API_URL" ]; then \
|
31 |
+
sed -i "s|^API_URL=.*|API_URL=${API_URL}|" .env; \
|
32 |
fi && \
|
33 |
if [ -n "$API_PORT" ]; then \
|
34 |
+
sed -i "s|^API_PORT=.*|API_PORT=${API_PORT}|" .env; \
|
35 |
fi
|
36 |
|
37 |
# 输出.env文件内容以进行调试
|