Spaces:
Build error
Build error
tests
Browse files- 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
|
19 |
-
COPY
|
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 ||
|
29 |
-
&& MODEL_PARAMS=cat /run/secrets/MODEL_PARAMS 2> /dev/null ||
|
30 |
-
&& MONGODB_URL=cat /run/secrets/MONGODB_URL 2> /dev/null ||
|
31 |
-
&& APP_COLOR=cat /run/secrets/APP_COLOR 2> /dev/null ||
|
32 |
-
&& APP_NAME=cat /run/secrets/APP_NAME 2> /dev/null ||
|
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 |
|