Skip to content

Commit

Permalink
Merge 0fbec39 into baf0421
Browse files Browse the repository at this point in the history
  • Loading branch information
itoumlilt authored Mar 18, 2019
2 parents baf0421 + 0fbec39 commit 205b5c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM erlang:19
FROM erlang:21

ENV HANDOFF_PORT "8099"
ENV PB_PORT "8087"
Expand All @@ -21,7 +21,7 @@ RUN set -xe \
&& git checkout $ANTIDOTE_BRANCH \
&& make rel \
&& cp -R _build/default/rel/antidote /opt/ \
&& sed -e '$i,{kernel, [{inet_dist_listen_min, 9100}, {inet_dist_listen_max, 9100}]}' /usr/src/antidote/_build/default/rel/antidote/releases/0.0.1/sys.config > /opt/antidote/releases/0.0.1/sys.config \
&& sed -e '$i,{kernel, [{inet_dist_listen_min, 9100}, {inet_dist_listen_max, 9100}]}' /usr/src/antidote/_build/default/rel/antidote/releases/0.0.2/sys.config > /opt/antidote/releases/0.0.2/sys.config \
&& rm -rf /usr/src/antidote /var/lib/apt/lists/*

ADD ./start_and_attach.sh /opt/antidote/
Expand Down
6 changes: 3 additions & 3 deletions Dockerfiles/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
set -e

if [ ! -f /opt/antidote/releases/0.0.1/setup_ok ]; then
cd /opt/antidote/releases/0.0.1/
if [[ ! -f /opt/antidote/releases/0.0.2/setup_ok ]]; then
cd /opt/antidote/releases/0.0.2/
cp vm.args vm.args_backup
if [ "$SHORT_NAME" = "true" ]; then
if [[ "$SHORT_NAME" = "true" ]]; then
sed "s/-name /-sname /" vm.args_backup > vm.args
fi
touch setup_ok
Expand Down
4 changes: 2 additions & 2 deletions Dockerfiles/start_and_attach.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh
#!/bin/bash

NPROC=$(nproc)

if [ "$NPROC" -ge 2 ]; then
if [[ ${NPROC} -ge 2 ]]; then
trap "echo 'Shutting down' && /opt/antidote/bin/env stop" TERM
/opt/antidote/bin/env start && sleep 10 && tail -f /opt/antidote/log/console.log & wait ${!}
else
Expand Down

0 comments on commit 205b5c0

Please sign in to comment.