Spaces:
Build error
Build error
export secrets properly
Browse files- Dockerfile +10 -4
Dockerfile
CHANGED
@@ -18,10 +18,16 @@ RUN --mount=type=cache,target=/app/.npm \
|
|
18 |
|
19 |
COPY .template.env.local .template.env.local
|
20 |
|
21 |
-
RUN --mount=type=secret,id=MODEL_NAME,mode=0444,required=true \
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
RUN npm run build
|
27 |
|
|
|
18 |
|
19 |
COPY .template.env.local .template.env.local
|
20 |
|
21 |
+
RUN --mount=type=secret,id=MODEL_NAME,mode=0444,required=true MYSECRET=$(cat /run/secrets/MODEL_NAME) \
|
22 |
+
&& export MODEL_NAME
|
23 |
+
|
24 |
+
RUN --mount=type=secret,id=PREPROMPT,mode=0444,required=true MYSECRET=$(cat /run/secrets/PREPROMPT) \
|
25 |
+
&& export PREPROMPT
|
26 |
+
|
27 |
+
RUN --mount=type=secret,id=MODEL_TEMPERATURE,mode=0444,required=true MYSECRET=$(cat /run/secrets/MODEL_TEMPERATURE) \
|
28 |
+
&& export MODEL_TEMPERATURE
|
29 |
+
|
30 |
+
RUN envsubst < ".template.env.local" > ".env.local"
|
31 |
|
32 |
RUN npm run build
|
33 |
|