nsarrazin HF staff commited on
Commit
fc3b984
1 Parent(s): 9a8980d
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -15,8 +15,8 @@ RUN --mount=type=cache,target=/app/.npm \
15
  npm set cache /app/.npm && \
16
  npm ci
17
 
18
- RUN mkdir -p /app/chat-ui/defaults
19
- COPY --chmod=0444 defaults/* /app/chat-ui/defaults/
20
 
21
  COPY .template.env.local .template.env.local
22
 
@@ -25,11 +25,11 @@ RUN --mount=type=secret,id=MODEL_NAME,mode=0444 \
25
  --mount=type=secret,id=MONGODB_URL,mode=0444 \
26
  --mount=type=secret,id=APP_COLOR,mode=0444 \
27
  --mount=type=secret,id=APP_NAME,mode=0444 \
28
- MODEL_NAME=cat /run/secrets/MODEL_NAME 2> /dev/null || /app/chat-ui/defaults/MODEL_NAME && export MODEL_NAME \
29
- && MODEL_PARAMS=cat /run/secrets/MODEL_PARAMS 2> /dev/null || /app/chat-ui/defaults/MODEL_PARAMS && export MODEL_PARAMS \
30
- && MONGODB_URL=cat /run/secrets/MONGODB_URL 2> /dev/null || /app/chat-ui/defaults/MONGODB_URL && export MONGODB_URL \
31
- && APP_COLOR=cat /run/secrets/APP_COLOR 2> /dev/null || /app/chat-ui/defaults/APP_COLOR && export APP_COLOR \
32
- && APP_NAME=cat /run/secrets/APP_NAME 2> /dev/null || /app/chat-ui/defaults/APP_NAME && export APP_NAME \
33
  && echo "$MONGODB_URL" \
34
  && envsubst < ".template.env.local" > ".env.local"
35
 
 
15
  npm set cache /app/.npm && \
16
  npm ci
17
 
18
+ RUN mkdir defaults
19
+ COPY defaults/* defaults/
20
 
21
  COPY .template.env.local .template.env.local
22
 
 
25
  --mount=type=secret,id=MONGODB_URL,mode=0444 \
26
  --mount=type=secret,id=APP_COLOR,mode=0444 \
27
  --mount=type=secret,id=APP_NAME,mode=0444 \
28
+ MODEL_NAME=cat /run/secrets/MODEL_NAME 2> /dev/null || defaults/MODEL_NAME && export MODEL_NAME \
29
+ && MODEL_PARAMS=cat /run/secrets/MODEL_PARAMS 2> /dev/null || defaults/MODEL_PARAMS && export MODEL_PARAMS \
30
+ && MONGODB_URL=cat /run/secrets/MONGODB_URL 2> /dev/null || defaults/MONGODB_URL && export MONGODB_URL \
31
+ && APP_COLOR=cat /run/secrets/APP_COLOR 2> /dev/null || defaults/APP_COLOR && export APP_COLOR \
32
+ && APP_NAME=cat /run/secrets/APP_NAME 2> /dev/null || defaults/APP_NAME && export APP_NAME \
33
  && echo "$MONGODB_URL" \
34
  && envsubst < ".template.env.local" > ".env.local"
35