Skip to content

Commit

Permalink
Replace msconfig.py to not use localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Mar 2, 2016
1 parent 4cbe478 commit 58bf85a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docker/ms/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ RUN wget -O syndicate.zip https://github.com/jcnelson/syndicate/archive/master.z
RUN unzip syndicate.zip
RUN mv syndicate-master syndicate
WORKDIR "syndicate"

# replace localhost to $MS_HOST$
RUN sed -i 's/localhost/$MS_HOST$/g' ms/common/msconfig.py

RUN make MS_APP_ADMIN_EMAIL=$MS_APP_ADMIN_EMAIL$
RUN echo "======== SYNDICATE ADMIN INFO ========"
RUN cat build/out/ms/common/admin_info.py
Expand Down
15 changes: 11 additions & 4 deletions docker/ms/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 admin_email"
exit 1
ADMIN_EMAIL=""
MS_HOST="localhost"
if [ "$#" -ge 1 ]; then
ADMIN_EMAIL=$1
fi

if [ "$#" -ge 2 ]; then
MS_HOST=$2
fi

# copy from template
cp Dockerfile.template Dockerfile
PARAM='s/\$MS_APP_ADMIN_EMAIL\$/'$1'/g'
PARAM='s/\$MS_APP_ADMIN_EMAIL\$/'$ADMIN_EMAIL'/g'
sed -i $PARAM Dockerfile
PARAM='s/\$MS_HOST\$/'$MS_HOST'/g'
sed -i $PARAM Dockerfile

#docker build --no-cache -t docker-ms .
Expand Down

0 comments on commit 58bf85a

Please sign in to comment.