Browse Source

Moved docker related files to new folder and introduction of ENTRYPOINT script

feature/dockerfile-arm
Gonzalo Javier Aune 5 years ago
parent
commit
9a0d89de57
  1. 13
      Dockerfile
  2. 6
      docker/entrypoint.sh
  3. 2
      docker/lnd.conf.sample
  4. 2
      docker/lnd_supervisor.conf
  5. 2
      docker/relay_supervisor.conf
  6. 0
      docker/supervisord.conf
  7. 0
      docker/unique-peer.txt

13
Dockerfile

@ -60,9 +60,9 @@ RUN npm cache clean --force
VOLUME /relay/.lnd
COPY ./lnd.conf.sample /relay/.lnd/lnd.conf
COPY ./docker/lnd.conf.sample /relay/.lnd/lnd.conf
RUN shuf -n 6 ./unique-peer.txt >> /relay/.lnd/lnd.conf
RUN shuf -n 6 ./docker/unique-peer.txt >> /relay/.lnd/lnd.conf
RUN git clone https://github.com/stakwork/sphinx-keysend-test/ /sphinx-keysend/
WORKDIR /sphinx-keysend/
@ -72,7 +72,8 @@ RUN npm install
WORKDIR /relay/
RUN mkdir -p /var/log/supervisor
COPY ./supervisord.conf /etc/supervisord.conf
COPY ./lnd_supervisor.conf /etc/supervisor.d/lnd_supervisor.ini
COPY ./relay_supervisor.conf /etc/supervisor.d/relay_supervisor.ini
CMD ["/usr/bin/supervisord"]
COPY ./docker/supervisord.conf /etc/supervisord.conf
COPY ./docker/lnd_supervisor.conf /etc/supervisor.d/lnd_supervisor.ini
COPY ./docker/relay_supervisor.conf /etc/supervisor.d/relay_supervisor.ini
ENTRYPOINT [ "./docker/entrypoint.sh" ]

6
docker/entrypoint.sh

@ -0,0 +1,6 @@
# export NODE_DOMAIN=$(curl $ECS_CONTAINER_METADATA_URI | echo $(jq -r .DockerName).$NODE_DOMAIN)
export NODE_DOMAIN=lvh.me
export NODE_ALIAS=$HOSTNAME
export NODE_IP=$NODE_SCHEME://$NODE_DOMAIN
/usr/bin/supervisord

2
lnd.conf.sample → docker/lnd.conf.sample

@ -8,6 +8,6 @@ rpclisten=0.0.0.0:10009
ignore-historical-gossip-filters=true
nobootstrap=true
numgraphsyncpeers=1
numgraphsyncpeers=7
routing.assumechanvalid=1
autopilot.active=false

2
lnd_supervisor.conf → docker/lnd_supervisor.conf

@ -1,6 +1,6 @@
[program:lnd]
user=root
command=sh -c 'lnd --lnddir=/relay/.lnd/ --alias=$HOSTNAME --tlsextradomain=$(curl $ECS_CONTAINER_METADATA_URI | echo $(jq -r .DockerName).$NODE_DOMAIN) --externalip=$(curl $ECS_CONTAINER_METADATA_URI | echo $(jq -r .DockerName).$NODE_DOMAIN)'
command=sh -c 'lnd --lnddir=/relay/.lnd/ --alias=$HOSTNAME --tlsextradomain=$NODE_DOMAIN --externalip=$NODE_DOMAIN'
startretries=999999999999999999999999999
autostart=true
autorestart=true

2
relay_supervisor.conf → docker/relay_supervisor.conf

@ -1,6 +1,6 @@
[program:relay]
user=root
command=sh -c 'export NODE_ALIAS=$HOSTNAME && export NODE_IP=$NODE_SCHEME://$(curl $ECS_CONTAINER_METADATA_URI | echo $(jq -r .DockerName).$NODE_DOMAIN) && npm run start-ecs --prefix /relay/'
command=sh -c 'npm run start-ecs --prefix /relay/'
startretries=999999999999999999999999999
autostart=true
autorestart=true

0
supervisord.conf → docker/supervisord.conf

0
unique-peer.txt → docker/unique-peer.txt

Loading…
Cancel
Save