nsarrazin HF staff commited on
Commit
1d26e73
1 Parent(s): a36deec

export secrets properly

Browse files
Files changed (1) hide show
  1. 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
- --mount=type=secret,id=PREPROMPT,mode=0444,required=true \
23
- --mount=type=secret,id=MODEL_TEMPERATURE,mode=0444,required=true \
24
- envsubst < ".template.env.local" > ".env.local"
 
 
 
 
 
 
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