23 Commits
Author SHA1 Message Date
Mark Beamer Jr ec08e36979 tweaked lbrynet docker stuff 2019-02-28 10:00:06 -05:00
Leopere c1cfd936fa Readme tweaking for modernized container update 2018-11-29 20:01:58 +00:00
Leopere b285a49227 Container builds and runs now.
Entrypoint needs updated to use entrypoint but otherwise stable.
2018-11-29 19:37:32 +00:00
Leopere 992a2ab7c9 updated home dir 2018-11-29 19:23:34 +00:00
Leopere cedb74dc3d On second thought don't declare a VOLUME here. 2018-11-29 19:17:49 +00:00
Leopere 38320c2204 Add placeholder healthcheck.sh 2018-11-29 19:16:46 +00:00
Leopere 2db22bccd1 Merge branch 'master' into lbrynet 2018-11-29 19:14:18 +00:00
Leopere 020344c481 Network name needs to not match this users name 2018-11-29 19:11:36 +00:00
Leopere 083c9f3906 Updated networking to match master 2018-11-29 19:09:05 +00:00
Leopere 1886f87b06 Merge branch 'master' into lbrynet 2018-11-29 19:08:01 +00:00
Leopere d37a932774 Merge branch 'master' into lbrynet 2018-11-29 19:04:50 +00:00
Leopere 0d0c88c850 fixup 2018-11-29 19:02:45 +00:00
Leopere 79c08b66f2 Completed ToDo item. 2018-11-29 18:46:23 +00:00
Leopere b206c5f3b4 Clarification added to port 50001 2018-11-29 18:45:53 +00:00
Leopere c8ceb79651 Just expose the ports it doesn't really pose any risks. 2018-11-29 18:40:19 +00:00
Leopere 062c72c5f4 Updated Dockerfile, Entrypoint and start
Dockerfile, cleanup and added start.sh & docker-entrypoint.sh
chmod +x on lbrynet/stuff/*.sh
2018-11-29 18:29:19 +00:00
Leopere adebf46603 Add start.sh for lbrynet 2018-11-29 18:20:32 +00:00
Leopere 68824f95e7 Cleanup and a bit of modernization in invocation 2018-11-29 15:25:59 +00:00
Leopere 9a67d873f9 More WIP tags 2018-11-26 23:14:00 +00:00
Leopere aae9221c72 Added WIP tag to README header 2018-11-26 23:13:06 +00:00
Leopere 1d6e17c810 Adding stuff dir and start/entrypoint scripts 2018-11-26 23:11:50 +00:00
Leopere ada255021c Added todo items into lbrynet compose.yml 2018-11-26 23:09:22 +00:00
Leopere 32d7abf54e Adding todo list items for lbrynet Dockerfile 2018-11-26 23:07:07 +00:00
11 changed files with 129 additions and 0 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
data/
+1
View File
@@ -0,0 +1 @@
data/
+45
View File
@@ -0,0 +1,45 @@
## This base image is for running the latest lbrynet-daemon release.
FROM ubuntu:18.04
LABEL MAINTAINER="leopere [at] nixc [dot] us"
RUN apt-get update && apt-get -y install unzip && apt-get install -y ca-certificates
RUN adduser lbrynet --gecos GECOS --shell /bin/bash --disabled-password --home /lbrynet/
## Add lbrynet
ADD https://lbry.io/get/lbrynet.linux.zip /lbrynet/lbrynet.linux.zip
RUN unzip /lbrynet/lbrynet.linux.zip -d /lbrynet/ && \
rm /lbrynet/lbrynet.linux.zip && \
chown -Rv lbrynet:lbrynet /lbrynet && \
mv /lbrynet/lbrynet /bin/
# COPY stuff/debugpaste-it.sh /usr/local/bin/debugpaste-it
COPY stuff/start.sh /usr/local/bin/start
COPY stuff/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
COPY stuff/healthcheck.sh /usr/local/bin/healthcheck
COPY stuff/daemon_settings.yml /lbrynet/daemon_settings.yml
## Daemon port [Intended for internal use]
## LBRYNET talks to peers on port 3333 [Intended for external use] this port is used to discover other lbrynet daemons with blobs.
## Expose 5566 Reflector port to listen on
## Expose 5279 Port the daemon API will listen on
## the lbryumx aka Wallet port [Intended for internal use]
#EXPOSE 4444 3333 5566 52800 50001
## TODO: Have wallets stored on their own volume/subdirectory for security, and backups.
## Volumize the wallets in a separate location for backup purposes may be unnecessary.
# VOLUME /lbrynet/.local/share/lbry/lbryum/wallets
# VOLUME /lbrynet/.local/
## Example daemon_settings.yml is at https://github.com/lbryio/lbry/blob/master/example_daemon_settings.yml
##ADD https://raw.githubusercontent.com/lbryio/lbry/master/example_daemon_settings.yml /etc/lbrynet/example_daemon_settings.yml
## TODO: In start.sh detect and merge changes.
# VOLUME /etc/lbry/daemon_settings.yml
## TODO: Downloaded blobs will be in their own separate volume for keeping backups of critical secrets and data separate from backups of potentially massive blob files.
# VOLUME /lbrynet/Downloads/
ENTRYPOINT ["/bin/bash"]
CMD ["start"]
+24
View File
@@ -0,0 +1,24 @@
## lbrynet-As-A-Container
More documentation to come however the Invocation section should include enough to get you going. You're going to need at least docker docker-compose and git installed on whatever host OS you wish to use.
#### Invocation
This will get you a running copy of the lbrynet-daemon running inside of a docker container with default settings.
```
git clone https://github.com/chamunks/lbry-docker.git
cd ./lbry-docker/lbrynet/
docker-compose up -d
```
#### Executing commands
To list containers on the host execute `docker ps -a` then run `docker exec CONTAINERNAME lbrynet-cli commands`
#### Docker Directory
This directory is in case we need to expand the functionality of this container at some point in the future.
#### Configuration
There's really no configuration required to launch this just launch it. However your blockchain data and other things are currently located in the applications home Directory here's a link to the [Documentation](https://lbry.io/faq/lbry-directories) for useful directories with lbrynet-daemon
*daemon_settings.yml* is on its way and it will be configurable soon via env-vars with *docker-compose.yml*
+3
View File
@@ -0,0 +1,3 @@
## Planned container [WIP/Planned]
This will eventually be a container for compiling the lbrynet-daemon from source.
Anyone who wants to replicate the build process in case they feel like wearing a tin foil hat or contributing to the project could use this.
+15
View File
@@ -0,0 +1,15 @@
version: '3.4'
services:
#############
## Lbrynet ##
#############
lbrynet:
build: .
ports:
- 5280:52800
- 4444:4444
- 50001:50001
## host volumes for persistent data such as wallet private keys.
volumes:
- ./data:/lbrynet
+16
View File
@@ -0,0 +1,16 @@
share_usage_data: True
lbryum_servers:
- lbryumx1.lbry.io:50001
- lbryumx2.lbry.io:50001
blockchain_name: lbrycrd_main
data_dir: /home/lbry/.lbrynet
download_directory: /home/lbry/downloads
delete_blobs_on_remove: True
dht_node_port: 4444
port: 5280
peer_port: 3333
use_upnp: True
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
echo "For now we're going to go with a tune in next time for a debugpaste."
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
## TODO: Start work for the docker-entrypoint.sh for lbrynet daemon
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
## TODO: write a healthcheck script.
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
## Scope: This start.sh script will asssert container filesystem permissions and
## then execute the desired run mode for lbrynet with reduced permissions.
## The other thing this should do is simply create, configure or simply establish
## a fresh config with envvars passed to the container.
## Ensure perms are correct prior to running main binary
mkdir -p /lbrynet
chown -R lbrynet:lbrynet /lbrynet
chmod -R 755 /lbrynet
## TODO: Consider a config directory for future magic.
# chown -R 1000:1000 /etc/lbrynet
# chmod -R 755 /etc/lbrynet
# rm -f /var/run/lbrynet.pid
su -c "lbrynet start --api localhost:5280"