Compare commits

..

1 Commits

Author SHA1 Message Date
Luke Childs
e9bc6b56d8 Get leveldb-dev from main repository (#40) 2019-11-05 16:42:43 +07:00
6 changed files with 26 additions and 86 deletions

7
.github/FUNDING.yml vendored
View File

@ -1,7 +0,0 @@
github:
- 'lukechilds'
custom:
- 'https://blockstream.info/address/1LukeQU5jwebXbMLDVydeH4vFSobRV9rkj'
- 'https://blockstream.info/address/3Luke2qRn5iLj4NiFrvLBu2jaEj7JeMR6w'
- 'https://blockstream.info/address/bc1qlukeyq0c69v97uss68fet26kjkcsrymd2kv6d4'
- 'https://tippin.me/@lukechilds'

View File

@ -1,39 +0,0 @@
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" .

7
.travis.yml Normal file
View File

@ -0,0 +1,7 @@
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

View File

@ -1,18 +1,15 @@
ARG VERSION=1.16.0
FROM python:3.7-alpine3.11
FROM python:3.7-alpine3.7
LABEL maintainer="Luke Childs <lukechilds123@gmail.com>"
ARG VERSION
COPY ./bin /usr/local/bin
COPY ./VERSION /tmp
RUN chmod a+x /usr/local/bin/* && \
RUN VERSION=$(cat /tmp/VERSION) && \
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/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 && \
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 && \
cd electrumx && \
python setup.py install && \
apk del git build-base && \
@ -21,14 +18,14 @@ RUN chmod a+x /usr/local/bin/* && \
VOLUME ["/data"]
ENV HOME /data
ENV ALLOW_ROOT 1
ENV EVENT_LOOP_POLICY uvloop
ENV DB_DIRECTORY /data
ENV SERVICES=tcp://:50001,ssl://:50002,wss://:50004,rpc://0.0.0.0:8000
ENV TCP_PORT=50001
ENV SSL_PORT=50002
ENV SSL_CERTFILE ${DB_DIRECTORY}/electrumx.crt
ENV SSL_KEYFILE ${DB_DIRECTORY}/electrumx.key
ENV HOST ""
WORKDIR /data
EXPOSE 50001 50002 50004 8000
EXPOSE 50001 50002
CMD ["init"]

View File

@ -4,9 +4,7 @@
[![Build Status](https://travis-ci.org/lukechilds/docker-electrumx.svg?branch=master)](https://travis-ci.org/lukechilds/docker-electrumx)
[![Image Layers](https://images.microbadger.com/badges/image/lukechilds/electrumx.svg)](https://microbadger.com/images/lukechilds/electrumx)
[![Docker Pulls](https://img.shields.io/docker/pulls/lukechilds/electrumx.svg)](https://hub.docker.com/r/lukechilds/electrumx/)
[![GitHub Donate](https://badgen.net/badge/GitHub/Sponsor/D959A7?icon=github)](https://github.com/sponsors/lukechilds)
[![Bitcoin Donate](https://badgen.net/badge/Bitcoin/Donate/F19537?icon=bitcoin)](https://blockstream.info/address/3Luke2qRn5iLj4NiFrvLBu2jaEj7JeMR6w)
[![Lightning Donate](https://badgen.net/badge/Lightning/Donate/F6BC41?icon=bitcoin-lightning)](https://tippin.me/@lukechilds?refurl=github.com/lukechilds/docker-electrumx)
[![tippin.me](https://badgen.net/badge/%E2%9A%A1%EF%B8%8Ftippin.me/@lukechilds/F0918E)](https://tippin.me/@lukechilds)
> Run an Electrum server with one command
@ -14,41 +12,24 @@ 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 \
-d --network="host"
-v electrumx:/data \
-e DAEMON_URL=http://user:pass@127.0.0.1:7313 \
-e COIN=FLO \
ranchimallfze/electrumx
-v /home/username/electrumx:/data \
-e DAEMON_URL=http://user:pass@host:port \
-e COIN=BitcoinSegwit \
-p 50002:50002 \
lukechilds/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/spesmilo/electrumx/blob/master/docs/environment.rst
You can view all ElectrumX environment variables here: https://github.com/kyuupichan/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.
### 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**
### Version
You can also run a specific version of ElectrumX if you want.

1
VERSION Normal file
View File

@ -0,0 +1 @@
1.11.0