Adjusting to new structure

Replaced build with image docker-compose.yml-prod-example

Adjusted paths in volumes

Removed a few more things

healthcheck.sh which can be added later when completed.
renamed the Dockerfile to Dockerfile-x86_64-production

Updated image tag and added RUN_MODE

Updated image and added RUN_MODE

updated tag

Updated tag
This commit is contained in:
Leopere 2019-04-25 18:54:08 -04:00 committed by Ryan McGuire
parent 70ae63d02a
commit c3accd79bd
8 changed files with 26 additions and 46 deletions

View file

@ -23,7 +23,10 @@ See [Running from source](##Running-from-source) for the current instructions on
#### Currently supported platforms #### Currently supported platforms
**X64 cpu architecture** **X86_64 cpu architecture**
Lbrynet, Lbrycrd, Chainqery are currently supported.
**Some arm architectures**
**More will be added on request and over time** **More will be added on request and over time**
@ -50,7 +53,7 @@ Keep in mind [I am](https://github.com/leopere/) preferential to receiving patch
## Getting Support ## Getting Support
#### Debugpaste [WIP] <!-- #### Debugpaste [WIP]
I'll be including a function to get a self destructing debugpaste of your LBRY appliances logs you'll be able to execute something similar to the following in all containers to export raw logs to a paste service where you can then either modify them removing sensitive data or just take that URL and create a new issue after you [(Use Issue Search)](https://github.com/lbryio/lbry-docker/issues?utf8=%E2%9C%93&q=is%3Aissue) to make sure there isn't already an open thread for your issue. I'll be including a function to get a self destructing debugpaste of your LBRY appliances logs you'll be able to execute something similar to the following in all containers to export raw logs to a paste service where you can then either modify them removing sensitive data or just take that URL and create a new issue after you [(Use Issue Search)](https://github.com/lbryio/lbry-docker/issues?utf8=%E2%9C%93&q=is%3Aissue) to make sure there isn't already an open thread for your issue.
#### Example debugpaste #### Example debugpaste
@ -60,7 +63,7 @@ docker-compose exec chainquery debugpaste
https://haste.nixc.us/ocatumatozaq.nginx https://haste.nixc.us/ocatumatozaq.nginx
``` ```
You can then take output given in the response from the debugpaste command and put that into your github issue (This may be automated at some point to some degree). You can then take output given in the response from the debugpaste command and put that into your github issue (This may be automated at some point to some degree).
-->
#### Creating an Issue #### Creating an Issue
Please be sure to fill out the [issue template](https://github.com/lbryio/lbry-docker/issues/new) as best as possible. This will help us answer your questions faster and fix things quicker if we have quality reports. Please be sure to fill out the [issue template](https://github.com/lbryio/lbry-docker/issues/new) as best as possible. This will help us answer your questions faster and fix things quicker if we have quality reports.

View file

@ -27,16 +27,15 @@ services:
ports: ports:
- 3306:3306 - 3306:3306
volumes: volumes:
- ./data/db:/var/lib/mysql - ../persist/chainquery/db:/var/lib/mysql
- ./stuff/my.cnf:/etc/mysql/conf.d/chainquery-optimizations.cnf ## This one may need to be tweaked based on where you run this docker-compose from.
- ../stuff/my.cnf:/etc/mysql/conf.d/chainquery-optimizations.cnf
################ ################
## Chainquery ## ## Chainquery ##
################ ################
chainquery: chainquery:
build: image: lbryio/lbry-docker:linux-x86_64-production
context: .
target: app
restart: always restart: always
networks: networks:
lbry-network: lbry-network:
@ -54,4 +53,4 @@ services:
- mysql - mysql
## TODO: Uncomment this in a docker-compose.override.yml to allow for external configurations. ## TODO: Uncomment this in a docker-compose.override.yml to allow for external configurations.
# volumes: # volumes:
# - ./data/config/chainqueryconfig.toml:/etc/chainquery/chainqueryconfig.toml # - ../persist/chainquery/config/chainqueryconfig.toml:/etc/chainquery/chainqueryconfig.toml

View file

@ -1 +0,0 @@
# TODO: write compile container

View file

@ -5,7 +5,7 @@ services:
## Lbrycrd ## ## Lbrycrd ##
############# #############
lbrycrd: lbrycrd:
image: tiger5226/regtest image: lbry/lbry-docker:lbrycrd-linux-x86_64-production
restart: always restart: always
ports: ports:
- "11336:9246" - "11336:9246"
@ -13,3 +13,5 @@ services:
## host volumes for persistent data such as wallet private keys. ## host volumes for persistent data such as wallet private keys.
volumes: volumes:
- "../persist/data:/data" - "../persist/data:/data"
environment:
- RUN_MODE=regtest

View file

@ -1,20 +1,11 @@
version: '3.4' version: '3.4'
## README
# To run a local instance of testnet via docker:
#
# 1) clone this repository
#
# 2) Run `cd ./lbrycrd/testnet`
#
# 3) Run `docker-compose up -d`
services: services:
############# #############
## Lbrycrd ## ## Lbrycrd ##
############# #############
lbrycrd: lbrycrd:
image: tiger5226/testnet image: lbry/lbry-docker:lbrycrd-linux-x86_64-production
restart: always restart: always
ports: ports:
- "11336:9246" - "11336:9246"
@ -22,3 +13,5 @@ services:
## host volumes for persistent data such as wallet private keys. ## host volumes for persistent data such as wallet private keys.
volumes: volumes:
- "../persist/data:/data" - "../persist/data:/data"
environment:
- RUN_MODE=testnet

View file

@ -2,20 +2,18 @@
FROM ubuntu:18.04 FROM ubuntu:18.04
LABEL MAINTAINER="leopere [at] nixc [dot] us" LABEL MAINTAINER="leopere [at] nixc [dot] us"
RUN apt-get update && apt-get -y install unzip
RUN adduser lbrynet --gecos GECOS --shell /bin/bash --disabled-password --home /lbrynet/
## Add lbrynet ## Add lbrynet
ADD https://lbry.io/get/lbrynet.linux.zip /lbrynet/lbrynet.linux.zip ADD https://lbry.io/get/lbrynet.linux.zip /lbrynet/lbrynet.linux.zip
RUN unzip /lbrynet/lbrynet.linux.zip -d /lbrynet/ && \
RUN apt-get update && apt-get -y install unzip && \
adduser lbrynet --gecos GECOS --shell /bin/bash --disabled-password --home /home/lbrynet && \
unzip /lbrynet/lbrynet.linux.zip -d /lbrynet/ && \
rm /lbrynet/lbrynet.linux.zip && \ rm /lbrynet/lbrynet.linux.zip && \
chown -Rv lbrynet:lbrynet /lbrynet && \ chown -Rv lbrynet:lbrynet /lbrynet && \
mv /lbrynet/lbrynet /bin/ mv /lbrynet/lbrynet /bin/
# COPY stuff/debugpaste-it.sh /usr/local/bin/debugpaste-it
COPY stuff/start.sh /usr/local/bin/start COPY stuff/start.sh /usr/local/bin/start
COPY stuff/docker-entrypoint.sh /usr/local/bin/docker-entrypoint COPY stuff/checkmount.sh /usr/local/bin/checkmount
COPY stuff/healthcheck.sh /usr/local/bin/healthcheck
## Daemon port [Intended for internal use] ## 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. ## LBRYNET talks to peers on port 3333 [Intended for external use] this port is used to discover other lbrynet daemons with blobs.
@ -24,21 +22,9 @@ COPY stuff/healthcheck.sh /usr/local/bin/healthcheck
## the lbryumx aka Wallet port [Intended for internal use] ## the lbryumx aka Wallet port [Intended for internal use]
EXPOSE 4444 3333 5566 5279 50001 EXPOSE 4444 3333 5566 5279 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 ## 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 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. EXPOSE 5279
# VOLUME /etc/lbry/daemon_settings.yml USER lbrynet
ENTRYPOINT ["/usr/local/bin/checkmount"]
## 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"] CMD ["start"]

View file

@ -1,2 +0,0 @@
#!/usr/bin/env bash
## TODO: write a healthcheck script.