File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed
Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,12 @@ FROM python:3
22
33WORKDIR /usr/src/app
44
5- COPY requirements.txt ./
5+ COPY . .
6+
67RUN pip install --no-cache-dir -r requirements.txt
7- RUN git clone https://github.com/SilverLineFramework/libsilverline.git
8- COPY libsilverline/requirements.txt ./
8+ WORKDIR /usr/src/app/libsilverline
99RUN pip install --no-cache-dir -r requirements.txt
1010
11- COPY . .
12-
1311WORKDIR /usr/src/app
1412
1513RUN chmod +x wait-for-it.sh
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- make migrate
4- python manage.py runserver 0.0.0.0:8000
3+ config_file=${RTCONF_CONF_FILE:- config.json}
4+ echo " Config file: " $config_file
5+ pwd_file=$( grep ' "pwd"' $config_file | cut -d' "' -f 4)
6+ echo " Pwd file : " $pwd_file
7+
8+ if [[ ! -z " ${RTCONF_PWD_FILE_CONTENTS} " ]]; then
9+ echo " Creating mqtt_pwd.txt from env."
10+ echo ${RTCONF_PWD_FILE_CONTENTS} > $pwd_file
11+ fi
12+
13+ for key in $( tail -n +2 config.json | head -n -1 | cut -d' :' -f1 | sed ' s/\"//g' )
14+ do
15+ conf_key=RTCONF_` echo $key | tr ' [:lower:]' ' [:upper:]' `
16+ if [[ ! -z " ${! conf_key} " ]]; then
17+ echo " Replacing conf: " ${conf_key} :${! conf_key}
18+ sed -i " s/\" $key \" \:.*/\" $key \" \:${! conf_key} ,/" $config_file
19+ fi
20+ done
21+
22+ # make migrate
23+ # python manage.py runserver 0.0.0.0:8000
You can’t perform that action at this time.
0 commit comments