Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
134cd34343 | ||
|
|
224ee03a4c | ||
|
|
1e65ac24f7 | ||
|
|
16bac03eb5 | ||
|
|
ae0dcbb302 | ||
|
|
550590c891 | ||
|
|
306061fd24 | ||
|
|
cbedc7e181 | ||
|
|
df67c3360a | ||
|
|
414bae37ba | ||
|
|
1fcf5c8fbc | ||
|
|
18cd61aa4c | ||
|
|
574f051a84 | ||
|
|
c25d387987 | ||
|
|
43a81cf88f | ||
|
|
e11faebe81 | ||
|
|
1cd386c283 | ||
|
|
eea20f012b | ||
|
|
a89d072599 | ||
|
|
1af263321a | ||
|
|
54ca0450d9 | ||
|
|
6bc0b59eae | ||
|
|
728780177c | ||
|
|
8317befc76 | ||
|
|
5d5a762396 | ||
|
|
43d64c787c | ||
|
|
fb93f3a85b | ||
|
|
275de08342 | ||
|
|
37e16e42e7 | ||
|
|
8e5399c934 | ||
|
|
0d6c8b3ddd | ||
|
|
27b58ebbfa | ||
|
|
d7fa71a04f |
7
.github/FUNDING.yml
vendored
Normal file
7
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
github:
|
||||
- 'lukechilds'
|
||||
custom:
|
||||
- 'https://blockstream.info/address/1LukeQU5jwebXbMLDVydeH4vFSobRV9rkj'
|
||||
- 'https://blockstream.info/address/3Luke2qRn5iLj4NiFrvLBu2jaEj7JeMR6w'
|
||||
- 'https://blockstream.info/address/bc1qlukeyq0c69v97uss68fet26kjkcsrymd2kv6d4'
|
||||
- 'https://tippin.me/@lukechilds'
|
||||
39
.github/workflows/on-master-push.yml
vendored
Normal file
39
.github/workflows/on-master-push.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
name: Build on master push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
VERSION: 1.16.0
|
||||
steps:
|
||||
- name: Login to Docker Hub
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u lukechilds --password-stdin
|
||||
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
id: qemu
|
||||
|
||||
- name: Setup Docker buildx action
|
||||
uses: docker/setup-buildx-action@v1
|
||||
id: buildx
|
||||
|
||||
- name: Run Docker buildx
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--build-arg VERSION=$VERSION \
|
||||
--tag lukechilds/electrumx:v$VERSION \
|
||||
--tag lukechilds/electrumx:latest \
|
||||
--output "type=registry" .
|
||||
@ -1,7 +0,0 @@
|
||||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
script: docker build -t electrumx . && ( docker run electrumx cat /electrumx/electrumx/__init__.py | tee /dev/stderr | grep -q "'ElectrumX $(cat VERSION)'" ) 2>&1
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
25
Dockerfile
25
Dockerfile
@ -1,15 +1,18 @@
|
||||
FROM python:3.7-alpine3.7
|
||||
ARG VERSION=1.16.0
|
||||
|
||||
FROM python:3.7-alpine3.11
|
||||
LABEL maintainer="Luke Childs <lukechilds123@gmail.com>"
|
||||
|
||||
COPY ./bin /usr/local/bin
|
||||
COPY ./VERSION /tmp
|
||||
ARG VERSION
|
||||
|
||||
RUN VERSION=$(cat /tmp/VERSION) && \
|
||||
chmod a+x /usr/local/bin/* && \
|
||||
COPY ./bin /usr/local/bin
|
||||
|
||||
RUN chmod a+x /usr/local/bin/* && \
|
||||
apk add --no-cache git build-base openssl && \
|
||||
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main leveldb-dev && \
|
||||
pip install aiohttp pylru plyvel && \
|
||||
git clone -b $VERSION https://github.com/kyuupichan/electrumx.git && \
|
||||
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.11/main leveldb-dev && \
|
||||
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing rocksdb-dev && \
|
||||
pip install aiohttp pylru plyvel websockets python-rocksdb uvloop && \
|
||||
git clone -b docker-image https://github.com/ranchimall/electrumx.git && \
|
||||
cd electrumx && \
|
||||
python setup.py install && \
|
||||
apk del git build-base && \
|
||||
@ -18,14 +21,14 @@ RUN VERSION=$(cat /tmp/VERSION) && \
|
||||
VOLUME ["/data"]
|
||||
ENV HOME /data
|
||||
ENV ALLOW_ROOT 1
|
||||
ENV EVENT_LOOP_POLICY uvloop
|
||||
ENV DB_DIRECTORY /data
|
||||
ENV TCP_PORT=50001
|
||||
ENV SSL_PORT=50002
|
||||
ENV SERVICES=tcp://:50001,ssl://:50002,wss://:50004,rpc://0.0.0.0:8000
|
||||
ENV SSL_CERTFILE ${DB_DIRECTORY}/electrumx.crt
|
||||
ENV SSL_KEYFILE ${DB_DIRECTORY}/electrumx.key
|
||||
ENV HOST ""
|
||||
WORKDIR /data
|
||||
|
||||
EXPOSE 50001 50002
|
||||
EXPOSE 50001 50002 50004 8000
|
||||
|
||||
CMD ["init"]
|
||||
|
||||
38
README.md
38
README.md
@ -4,6 +4,9 @@
|
||||
[](https://travis-ci.org/lukechilds/docker-electrumx)
|
||||
[](https://microbadger.com/images/lukechilds/electrumx)
|
||||
[](https://hub.docker.com/r/lukechilds/electrumx/)
|
||||
[](https://github.com/sponsors/lukechilds)
|
||||
[](https://blockstream.info/address/3Luke2qRn5iLj4NiFrvLBu2jaEj7JeMR6w)
|
||||
[](https://tippin.me/@lukechilds?refurl=github.com/lukechilds/docker-electrumx)
|
||||
|
||||
> Run an Electrum server with one command
|
||||
|
||||
@ -11,24 +14,41 @@ An easily configurable Docker image for running an Electrum server.
|
||||
|
||||
## Usage
|
||||
|
||||
Create a Docker volume to store the data, and then run the container
|
||||
|
||||
|
||||
```
|
||||
docker volume create electrumx
|
||||
|
||||
docker run \
|
||||
-v /home/username/electrumx:/data \
|
||||
-e DAEMON_URL=http://user:pass@host:port \
|
||||
-e COIN=BitcoinSegwit \
|
||||
-p 50002:50002 \
|
||||
lukechilds/electrumx
|
||||
-d --network="host"
|
||||
-v electrumx:/data \
|
||||
-e DAEMON_URL=http://user:pass@127.0.0.1:7313 \
|
||||
-e COIN=FLO \
|
||||
ranchimallfze/electrumx
|
||||
```
|
||||
|
||||
If there's an SSL certificate/key (`electrumx.crt`/`electrumx.key`) in the `/data` volume it'll be used. If not, one will be generated for you.
|
||||
|
||||
You can view all ElectrumX environment variables here: https://github.com/kyuupichan/electrumx/blob/master/docs/environment.rst
|
||||
You can view all ElectrumX environment variables here: https://github.com/spesmilo/electrumx/blob/master/docs/environment.rst
|
||||
|
||||
### TCP Port
|
||||
|
||||
By default only the SSL port is exposed. You can expose the unencrypted TCP port with `-p 50001:50001`, although this is strongly discouraged.
|
||||
|
||||
### Version
|
||||
### WebSocket Port
|
||||
|
||||
You can expose the WebSocket port with `-p 50004:50004`.
|
||||
|
||||
### RPC Port
|
||||
|
||||
To access RPC from your host machine, you'll also need to expose port 8000. You probably only want this available to localhost: `-p 127.0.0.1:8000:8000`.
|
||||
|
||||
If you're only accessing RPC from within the container, there's no need to expose the RPC port.
|
||||
|
||||
### Version
|
||||
|
||||
**Note - this feature is to be finished for RanchiMall's FLO version**
|
||||
|
||||
You can also run a specific version of ElectrumX if you want.
|
||||
|
||||
@ -36,9 +56,9 @@ You can also run a specific version of ElectrumX if you want.
|
||||
docker run \
|
||||
-v /home/username/electrumx:/data \
|
||||
-e DAEMON_URL=http://user:pass@host:port \
|
||||
-e COIN=Bitcoin \
|
||||
-e COIN=BitcoinSegwit \
|
||||
-p 50002:50002 \
|
||||
lukechilds/electrumx:v1.2.1
|
||||
lukechilds/electrumx:v1.8.7
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Loading…
Reference in New Issue
Block a user