-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use xud default ports like 8886, 18886, 28886 #395
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f314d52
use xud default ports like 8886, 18886, 28886
reliveyy 91f2b80
fix xucli create
reliveyy 81519bd
remove --rpcport for xucli
reliveyy 067187e
use xud:latest (master) in testnet
reliveyy 519b0c8
Update images/xud/latest/xud-backup.sh
reliveyy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
FROM node:12-alpine3.11 AS builder | ||
ARG REPO=ExchangeUnion/xud | ||
ARG BRANCH=master | ||
RUN apk add --no-cache git rsync bash musl-dev go python3 make g++ | ||
# This is a "hack" to automatically invalidate the cache in case there are new commits | ||
ADD https://api.github.com/repos/$REPO/commits/$BRANCH /dev/null | ||
RUN git clone -b $BRANCH --depth=2 https://github.com/$REPO | ||
WORKDIR /xud | ||
RUN npm install | ||
RUN npm run compile | ||
RUN npm run compile:seedutil | ||
RUN npm prune --production | ||
RUN rm -rf seedutil/go | ||
|
||
|
||
FROM node:12-alpine3.11 | ||
RUN apk add --no-cache bash supervisor tor | ||
COPY --from=builder /xud /app | ||
COPY entrypoint.sh xud-backup.sh /app/ | ||
COPY start_tor.sh update-backup-dir.sh / | ||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
COPY torrc /etc/tor/torrc | ||
RUN ln -s /app/bin/xucli /usr/local/bin/xucli | ||
RUN mkdir -p /root/.xud/tor | ||
WORKDIR /app | ||
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] | ||
EXPOSE 8887 18887 28887 |
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,34 @@ | ||
FROM node:12-alpine3.11 AS builder | ||
ARG REPO=ExchangeUnion/xud | ||
ARG BRANCH=v1.0.0-beta.2 | ||
# Use pure JS implemented secp256k1 bindings | ||
RUN apk add --no-cache git rsync bash musl-dev go python3 make g++ | ||
# Pre-built binaries not found for sqlite3@4.1.0 and node@12.16.1 (node-v72 ABI, musl) (falling back to source compile with node-gyp) | ||
# python: not found | ||
RUN apk add --no-cache python | ||
# This is a "hack" to automatically invalidate the cache in case there are new commits | ||
ADD https://api.github.com/repos/$REPO/commits/$BRANCH /dev/null | ||
RUN git clone -b $BRANCH --depth=2 https://github.com/$REPO | ||
WORKDIR /xud | ||
RUN cp package.json /tmp/package.json | ||
RUN sed -Ei 's/"grpc-tools": "1.8.0",//g' package.json | ||
RUN npm install | ||
RUN cp /tmp/package.json package.json | ||
RUN npm run compile | ||
RUN npm run compile:seedutil | ||
RUN npm prune --production | ||
RUN rm -rf seedutil/go | ||
|
||
|
||
FROM node:12-alpine3.11 | ||
RUN apk add --no-cache bash supervisor tor | ||
COPY --from=builder /xud /app | ||
COPY entrypoint.sh xud-backup.sh /app/ | ||
COPY start_tor.sh update-backup-dir.sh / | ||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
COPY torrc /etc/tor/torrc | ||
RUN ln -s /app/bin/xucli /usr/local/bin/xucli | ||
RUN mkdir -p /root/.xud/tor | ||
WORKDIR /app | ||
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] | ||
EXPOSE 8887 18887 28887 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why??? You shouldn't create any xud.conf file because this would overwrite defaults in future when we change them on xud side! We always want to use xud defaults so you can't hardcode them.
You can pull the current xud defaults from the sample config files here: https://github.com/ExchangeUnion/xud-docker/tree/master/images/utils/launcher/config, I am maintaining them there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We create xud.conf to config xud for a long history. And this config file is updated when xud image updated. And I do modify sample-xud.conf from xud source. I'm not sure about your concerning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just don't create it, it will cause troubles overwriting things. We had that in multiple places before. xud has default values without any config and we assume these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to use command line options to customize xud configuration at the very beginning like other nodes. But later we changed to xud.conf file. So we are going to change it back? I remember we use this xud.conf becuase it's easy to change xud configuration by just editing host
data/xud/xud.conf
file and restarting xud container. And in case of xud container upgrading with old xud.conf file, we do override this file everytime. But if you specify--xud.preserve-config
you could remain the old config file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a full list of what we changed from
sample-xud.conf
:network
http.host
http.port
lnd.BTC.host
lnd.BTC.certpath
lnd.LTC.host
lnd.LTC.port
lnd.LTC.certpath
p2p.addresses
p2p.port
p2p.tor
p2p.torport
raiden.host
raiden.keystorepath
rpc.host
rpc.port
I think we can leave
http.port
,p2p.port
andrpc.port
out becuase there is no change to their default value now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these 3 options are in sample-xud.conf. And their values are for simnet. If we want to use default values, we need to delete these 3 options from xud.conf. So I'll leave it as it was.