nsarrazin HF staff commited on
Commit
e2f8494
1 Parent(s): 52252ea

use folder on root

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -16,8 +16,8 @@ RUN --mount=type=cache,target=/app/.npm \
16
  npm ci
17
 
18
  RUN mkdir defaults
19
- COPY defaults/* defaults/
20
- RUN chmod -R 644 defaults
21
  COPY .template.env.local .template.env.local
22
 
23
  RUN --mount=type=secret,id=MODEL_NAME,mode=0444 \
@@ -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 || 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
 
 
16
  npm ci
17
 
18
  RUN mkdir defaults
19
+ COPY defaults/* /defaults
20
+ RUN chmod -R 777 /defaults
21
  COPY .template.env.local .template.env.local
22
 
23
  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 || /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