forked from mgckind/des_ncsa
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set data release URL dynamically by env var DR_SERVER_URL
- Loading branch information
1 parent
0173be9
commit aa2d8c9
Showing
2 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ RUN npm install -g [email protected] | |
WORKDIR /opt | ||
COPY --chown=des:des ./ ./ | ||
|
||
ARG DRSERVER=desdr-server.ncsa.illinois.edu | ||
RUN find static/des_components -type f -exec sed -i "s/{{drserverbaseurl}}/${DRSERVER}/g" {} \; | ||
|
||
RUN vulcanize static/des_components/elements.html \ | ||
--exclude static/bower_components/polymer/lib/legacy/ \ | ||
|
@@ -23,4 +21,4 @@ RUN pip install --no-cache-dir jsmin | |
## Copy source files | ||
COPY --from=build /opt/ ./ | ||
|
||
CMD [ "python", "main.py" ] | ||
CMD [ "bash", "start.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
|
||
if [[ -z "$DR_SERVER_URL" ]]; then | ||
DR_SERVER_URL=desdr-server.ncsa.illinois.edu | ||
fi | ||
|
||
set -euo pipefail | ||
|
||
find static/des_components -type f -exec sed -i "s/{{drserverbaseurl}}/${DR_SERVER_URL}/g" {} \; | ||
|
||
python main.py |