Skip to content

Commit

Permalink
Updates to config file for ECS
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloaune committed May 4, 2020
1 parent 5e2cfae commit d16f978
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ EXPOSE 9735/udp
EXPOSE 10009/tcp
EXPOSE 10009/udp

ENV NODE_ALIAS mynodealias
ENV NODE_ENV production

# Add bash and ca-certs, for quality of life and SSL-related reasons.
Expand All @@ -50,16 +49,17 @@ COPY --from=builder /go/bin/lnd /bin/
RUN apk add --update nodejs nodejs-npm sqlite git supervisor

RUN git clone https://github.com/stakwork/sphinx-relay /relay/
RUN cd /relay && git checkout feature/docker

WORKDIR /relay/

RUN git checkout feature/docker

RUN npm install
RUN npm install nodemon --save-dev
RUN npm install express --save-dev
RUN npm install webpack webpack-cli --save-dev

RUN apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python
RUN apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python jq git
RUN npm install --quiet node-gyp -g

RUN npm install sqlite3 --build-from-source --save-dev
Expand All @@ -71,6 +71,9 @@ VOLUME /relay/.lnd

COPY ./lnd.conf.sample /relay/.lnd/lnd.conf

COPY init.sh /etc/profile.d/
RUN sudo chmod +x /etc/profile.d/init.sh

RUN mkdir -p /var/log/supervisor
COPY ./supervisord.conf /etc/supervisord.conf
COPY ./lnd_supervisor.conf /etc/supervisor.d/lnd_supervisor.ini
Expand Down
2 changes: 2 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_IP=$(curl http://169.254.170.2/v4/e52231f4-0246-4fc5-bc3e-ac20df1b118e | echo $(jq -r .DockerName).$NODE_DOMAIN)
NODE_ALIAS=$(curl http://169.254.170.2/v4/e52231f4-0246-4fc5-bc3e-ac20df1b118e | echo $(jq -r .DockerName))

0 comments on commit d16f978

Please sign in to comment.