Update Dockerfile
Browse files- Dockerfile +3 -1
Dockerfile
CHANGED
@@ -15,7 +15,9 @@ ARG DB_POSTGRESDB_PASSWORD=$DB_POSTGRESDB_PASSWORD
|
|
15 |
|
16 |
# 显示构建参数(调试用)
|
17 |
RUN --mount=type=secret,id=DB_POSTGRESDB_USER,mode=0444,required=true \
|
|
|
18 |
--mount=type=secret,id=DB_POSTGRESDB_PASSWORD,mode=0444,required=true \
|
|
|
19 |
echo "Build args: CACHEBUST=${CACHEBUST}, DB_HOST=${DB_POSTGRESDB_HOST}, DB_PORT=${DB_POSTGRESDB_PORT}"
|
20 |
|
21 |
# 设置 NC_DB 环境变量
|
@@ -32,5 +34,5 @@ USER node
|
|
32 |
# 显示运行时环境变量和 HOME 路径
|
33 |
RUN echo "HOME directory: $HOME"
|
34 |
CMD echo "Runtime NC_DB: $NC_DB" && \
|
35 |
-
|
36 |
/usr/src/appEntry/start.sh
|
|
|
15 |
|
16 |
# 显示构建参数(调试用)
|
17 |
RUN --mount=type=secret,id=DB_POSTGRESDB_USER,mode=0444,required=true \
|
18 |
+
echo "export DB_HOST=$(cat /run/secrets/DB_POSTGRESDB_USER)" >> $HOME/.nocodb_env && \
|
19 |
--mount=type=secret,id=DB_POSTGRESDB_PASSWORD,mode=0444,required=true \
|
20 |
+
echo "export DB_HOST=$(cat /run/secrets/DB_POSTGRESDB_PASSWORD)" >> $HOME/.nocodb_env && \
|
21 |
echo "Build args: CACHEBUST=${CACHEBUST}, DB_HOST=${DB_POSTGRESDB_HOST}, DB_PORT=${DB_POSTGRESDB_PORT}"
|
22 |
|
23 |
# 设置 NC_DB 环境变量
|
|
|
34 |
# 显示运行时环境变量和 HOME 路径
|
35 |
RUN echo "HOME directory: $HOME"
|
36 |
CMD echo "Runtime NC_DB: $NC_DB" && \
|
37 |
+
. $HOME/.nocodb_env && \
|
38 |
/usr/src/appEntry/start.sh
|