nsarrazin HF staff commited on
Commit
cedc7ab
1 Parent(s): e45341a

fix docker

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -12
Dockerfile CHANGED
@@ -28,12 +28,14 @@ RUN mkdir defaults
28
  ADD defaults /defaults
29
  RUN chmod -R 777 /defaults
30
  RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
31
- "${MODEL_NAME:="${cat /defaults/MODEL_NAME}"}" && export MODEL_NAME \
32
- "${MODEL_PARAMS:="${cat /defaults/MODEL_PARAMS}"}" && export MODEL_PARAMS \
33
- "${APP_COLOR:="${cat /defaults/APP_COLOR}"}" && export APP_COLOR \
34
- "${APP_NAME:="${cat /defaults/APP_NAME}"}" && export APP_NAME \
35
- && MONGODB_URL=$(cat /run/secrets/MONGODB_URL 2> /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL \
36
- && envsubst < ".env.local.template" > ".env.local" \
 
 
37
  && rm .env.local.template
38
 
39
 
@@ -66,13 +68,15 @@ COPY entrypoint.sh.template entrypoint.sh.template
66
  RUN mkdir defaults
67
  ADD defaults /defaults
68
  RUN chmod -R 777 /defaults
 
69
  RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
70
- "${MODEL_NAME:="${cat /defaults/MODEL_NAME}"}" && export MODEL_NAME \
71
- "${MODEL_PARAMS:="${cat /defaults/MODEL_PARAMS}"}" && export MODEL_PARAMS \
72
- "${APP_COLOR:="${cat /defaults/APP_COLOR}"}" && export APP_COLOR \
73
- "${APP_NAME:="${cat /defaults/APP_NAME}"}" && export APP_NAME \
74
- && MONGODB_URL=$(cat /run/secrets/MONGODB_URL 2> /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL \
75
- && envsubst < "entrypoint.sh.template" > "entrypoint.sh" \
 
76
  && rm entrypoint.sh.template
77
 
78
 
 
28
  ADD defaults /defaults
29
  RUN chmod -R 777 /defaults
30
  RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
31
+ MODEL_NAME="${MODEL_NAME:="$(cat /defaults/MODEL_NAME)"}" && export MODEL_NAME \
32
+ && MODEL_PARAMS="${MODEL_PARAMS:="$(cat /defaults/MODEL_PARAMS)"}" && export MODEL_PARAMS \
33
+ && APP_COLOR="${APP_COLOR:="$(cat /defaults/APP_COLOR)"}" && export APP_COLOR \
34
+ && APP_NAME="${APP_NAME:="$(cat /defaults/APP_NAME)"}" && export APP_NAME \
35
+ && MONGODB_URL=$(cat /run/secrets/MONGODB_URL > /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL
36
+
37
+ RUN echo "${MONGODB_URL}"
38
+ RUN envsubst < ".env.local.template" > ".env.local" \
39
  && rm .env.local.template
40
 
41
 
 
68
  RUN mkdir defaults
69
  ADD defaults /defaults
70
  RUN chmod -R 777 /defaults
71
+
72
  RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
73
+ MODEL_NAME="${MODEL_NAME:="$(cat /defaults/MODEL_NAME)"}" && export MODEL_NAME \
74
+ && MODEL_PARAMS="${MODEL_PARAMS:="$(cat /defaults/MODEL_PARAMS)"}" && export MODEL_PARAMS \
75
+ && APP_COLOR="${APP_COLOR:="$(cat /defaults/APP_COLOR)"}" && export APP_COLOR \
76
+ && APP_NAME="${APP_NAME:="$(cat /defaults/APP_NAME)"}" && export APP_NAME \
77
+ && MONGODB_URL=$(cat /run/secrets/MONGODB_URL > /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL
78
+
79
+ RUN envsubst < "entrypoint.sh.template" > "entrypoint.sh" \
80
  && rm entrypoint.sh.template
81
 
82