diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7cf799d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# os: linux -# dist: trusty -# -# services: -# - docker -# -# before_install: -# - docker build -t leopere/POTATO . -# # - docker run -d -p 127.0.0.1:80:4567 carlad/sinatra /bin/sh -c "cd /root/sinatra; bundle exec foreman start;" -# - docker ps -a -# - docker run carlad/sinatra /bin/sh -c "cd /root/sinatra; bundle exec rake test" -# -# script: -# - bundle exec rake test diff --git a/lbrynet/.gitignore b/lbrynet/.gitignore deleted file mode 100644 index 58e90b3..0000000 --- a/lbrynet/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -data/ -config/ diff --git a/lbrynet/Dockerfile b/lbrynet/Dockerfile deleted file mode 100644 index 8118ec0..0000000 --- a/lbrynet/Dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -## 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 -# RUN mkdir -pv /data && chown 1000:1000 /data -RUN adduser lbrynet --gecos GECOS --shell /bin/bash/ --disabled-password --home /data/ - -## Add lbrynet -ADD https://lbry.io/get/lbrynet.linux.zip /data/lbrynet.linux.zip -RUN unzip /data/lbrynet.linux.zip -d /data/ && \ - rm /data/lbrynet.linux.zip && \ - chown -Rv traefik:lbrynet /data - -RUN wget -quiet -O /usr/bin/debugpaste https://github.com/nixc-us/debugpaste-it/raw/master/bin/debugpaste_64 && \ - chmod +x /usr/bin/debugpaste - -## Install into PATH -RUN mv /data/lbrynet-* /bin/ - -COPY debugpaste-it.sh /usr/local/bin/debugpaste-it - -## Daemon port [Intended for internal use] -EXPOSE 4444 -## Wallet port [Intended for internal use] -EXPOSE 50001 - -## Undocumented ports that exist in conf.py -## API port -# EXPOSE 5279 -# ## Reflector port -# EXPOSE 5566 - -## VOLUMES -## Right now the volumes are just added in a commented out state but if the end -## user would prefer to add volumes to their own usage cases all they will need -## to do is uncomment what they require and then build the container using docker-compose.yml - -## Volumize the wallets in a separate location for backup purposes may be unnecessary. -# VOLUME /data/.local/share/lbry/lbryum/wallets -# VOLUME /data/.local/ -## If the config ends up needing it's own volume it should be located here. -# VOLUME /etc/lbry/conf.py -## 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 /data/Downloads/ - -## Never run container processes as root -USER lbrynet -## Run on container launch -CMD ["lbrynet-daemon"] - -## Setting this entrypoint should mean that you can `docker exec lbrynet commands` -## and you should be able to control the daemon's CLI this way. There is an -## alternative method we could use here where we have an entrypoint shell script which could be a bit smarter. -## An docker-entrypoint should eventually be created and installed into the container $PATH with a config install script that checks for the existance of a config.py and if it exists don't install docker envvars established elsewhere. -## If the container doesn't detect a conf.py file however have it install a fresh copy into /etc/lbry/conf.py and run that from a fresh copy from somewhere sensible. -# ENTRYPOINT ["lbrynet-cli"] diff --git a/lbrynet/README.md b/lbrynet/README.md deleted file mode 100644 index 31467dd..0000000 --- a/lbrynet/README.md +++ /dev/null @@ -1,22 +0,0 @@ -## lbrynet-As-A-Container - -I'll document a bit of this later but for now you may look over ```docker-compose.yml``` and then modify any environment variables you feel the need to. - -#### 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-daemon/ -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 diff --git a/lbrynet/compile/Dockerfile b/lbrynet/compile/Dockerfile deleted file mode 100644 index 62e2ac0..0000000 --- a/lbrynet/compile/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -## Convert this guide into a Dockerfile, have it spit out the compiled output. -## https://github.com/lbryio/lbry/blob/master/INSTALL.md diff --git a/lbrynet/compile/README.md b/lbrynet/compile/README.md deleted file mode 100644 index 907002e..0000000 --- a/lbrynet/compile/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Planned container -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. diff --git a/lbrynet/debugpaste-it.sh b/lbrynet/debugpaste-it.sh deleted file mode 100755 index 54d00fb..0000000 --- a/lbrynet/debugpaste-it.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -echo "For now we're going to go with a tune in next time for a debugpaste." diff --git a/lbrynet/docker-compose.yml b/lbrynet/docker-compose.yml deleted file mode 100644 index 5b2ce7f..0000000 --- a/lbrynet/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: '3.4' - -networks: - lbrynet: - external: true - -services: -############# -## Lbrynet ## -############# - lbrynet: - build: . - restart: always - networks: - lbrynet: - ipv4_address: 10.5.1.4 - labels: - - "traefik.expose=false" - ports: - - 4444:4444 - - 50001:50001 - ## host volumes for persistent data such as wallet private keys. - volumes: - - ./data/:/data diff --git a/traefik/network-up.sh b/network-up.sh similarity index 100% rename from traefik/network-up.sh rename to network-up.sh diff --git a/reflector.go/.env b/reflector.go/.env deleted file mode 100644 index 3979cb3..0000000 --- a/reflector.go/.env +++ /dev/null @@ -1,14 +0,0 @@ -#MYSQL_SERVER=${MYSQL_SERVER:-10.5.1.11} -#MYSQL_USER=${MYSQL_USER:-changeme} -#MYSQL_PASSWORD=${MYSQL_PASSWORD:-changeme} -#MYSQL_DATABASE=${MYSQL_DATABASE:-reflector} -#MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-changeme} -#AWS_ID=${AWS_ID:-default} -#AWS_SECRET=${AWS_SECRET:-default} -#BUCKET_REGION=${BUCKET_REGION:-default} -#BUCKET_NAME=${BUCKET_NAME:-default} -#DB_USER=${MYSQL_USER:-changeme} -#DB_PASSWORD=${MYSQL_PASSWORD:-changeme} -#DB_HOSTIP=${MYSQL_SERVER:-10.5.1.11} -#DB_PORT=${DB_PORT:-3306} -#DB_NAME=${MYSQL_DATABASE:-reflector} diff --git a/reflector.go/Dockerfile b/reflector.go/Dockerfile deleted file mode 100644 index 4977969..0000000 --- a/reflector.go/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -## base image for github.com/lbryio/reflector.go release binaries -FROM golang:1.11.1 as builder -LABEL MAINTAINER="leopere [at] nixc [dot] us" - -RUN export GOROOT=$GOPATH/bin && \ - go get -v -u github.com/lbryio/reflector.go && \ - cd "/go/src/github.com/lbryio/reflector.go" && \ - make && \ - mv ./bin/prism-bin /usr/bin/prism-bin && \ - chmod +x /usr/bin/prism-bin - -## base image for github.com/lbryio/reflector.go release binaries -FROM ubuntu:18:04 as app -LABEL MAINTAINER="leopere [at] nixc [dot] us" - -COPY /go/src/github.com/lbryio/reflector.go/bin/prism-bin /usr/bin/prism-bin -COPY start.sh /usr/local/bin/start -COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint - -RUN adduser reflector --gecos GECOS --shell /bin/bash --disabled-password --home /data/ && \ - apt-get update && \ - apt-get -y install && \ - wget -O /data/config.tmpl https://raw.githubusercontent.com/lbryio/reflector.go/master/config.tmpl && \ - chown -R 1000:1000 /data/config.tmpl - -USER reflector - -CMD ["start"] diff --git a/reflector.go/README.md b/reflector.go/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/reflector.go/compile/.env b/reflector.go/compile/.env deleted file mode 100644 index e69de29..0000000 diff --git a/reflector.go/compile/Dockerfile b/reflector.go/compile/Dockerfile deleted file mode 100644 index 48a2731..0000000 --- a/reflector.go/compile/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -## base image for github.com/lbryio/reflector.go release binaries -FROM golang:1.11.1 -LABEL MAINTAINER="leopere [at] nixc [dot] us" - -COPY start.sh /usr/local/bin/start -COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint - -RUN adduser reflector --gecos GECOS --shell /bin/bash --disabled-password --home /data/ - -RUN export GOROOT=$GOPATH/bin && \ - go get -v -u github.com/lbryio/reflector.go && \ - cd "/go/src/github.com/lbryio/reflector.go" && \ - make && \ - mv ./bin/prism-bin /usr/bin/prism-bin && \ - chmod +x /usr/bin/prism-bin - -RUN wget -O /data/config.tmpl https://raw.githubusercontent.com/lbryio/reflector.go/master/config.tmpl && \ - chown -R 1000:1000 /data/config.tmpl - -USER reflector - -CMD ["start"] diff --git a/reflector.go/compile/README.md b/reflector.go/compile/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/reflector.go/compile/config.tmpl b/reflector.go/compile/config.tmpl deleted file mode 100644 index 4ada19c..0000000 --- a/reflector.go/compile/config.tmpl +++ /dev/null @@ -1,8 +0,0 @@ -{ - "aws_id": "YOUR-AWS-ID", - "aws_secret": "YOUR-AWS-SECRET", - "bucket_region": "YOUR-BUCKET-REGION", - "bucket_name": "YOUR-BUCKET-NAME", - "db_conn": "USER:PASSWORD@tcp(localhost:3306)/DBNAME", - "slack_hook_url": "" -} diff --git a/reflector.go/compile/docker-compose.yml b/reflector.go/compile/docker-compose.yml deleted file mode 100644 index e71a583..0000000 --- a/reflector.go/compile/docker-compose.yml +++ /dev/null @@ -1,56 +0,0 @@ -version: '3.4' - -networks: - lbrynet: - external: true - -services: -########### -## MYSQL ## -########### -## MariaDB is currently not supported and neither is later versions of MySQL this may change. -## https://hub.docker.com/r/_/mariadb/ - mysql: - image: mysql.5.7.23 - restart: always - networks: - lbrynet: - ipv4_address: 10.5.1.11 - aliases: - - mysql - environment: - ## These variables are stored in the .env file next to this docker-compose.yml file. - ## I will include a default .env file and .gitignore the ".env" pattern so you should be able to just git pull in the future if you need to. - MYSQL_SERVER: ${MYSQL_SERVER:-10.5.1.11} - MYSQL_USER: ${MYSQL_USER:-changeme} - MYSQL_PASSWORD: ${MYSQL_PASSWORD:-changeme} - MYSQL_DATABASE: ${MYSQL_DATABASE:-reflector} - MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-changeme} - expose: - - 3306 - volumes: - - ./data/db:/var/lib/mysql - -################## -## reflector.go ## -################## - reflector-go: - build: . - restart: always - networks: - lbrynet: - ipv4_address: 10.5.1.20 - environment: - AWS_ID: ${AWS_ID:-default} - AWS_SECRET: ${AWS_SECRET:-default} - BUCKET_REGION: ${BUCKET_REGION:-default} - BUCKET_NAME: ${BUCKET_NAME:-default} - DB_USER: ${MYSQL_USER:-changeme} - DB_PASSWORD: ${MYSQL_PASSWORD:-changeme} - DB_HOSTIP: ${MYSQL_SERVER:-10.5.1.11} - DB_PORT: ${DB_PORT:-3306} - DB_NAME: ${MYSQL_DATABASE:-reflector} - labels: - - "traefik.expose=false" - depends_on: - - mysql diff --git a/reflector.go/compile/docker-entrypoint.sh b/reflector.go/compile/docker-entrypoint.sh deleted file mode 100644 index e69de29..0000000 diff --git a/reflector.go/compile/start.sh b/reflector.go/compile/start.sh deleted file mode 100755 index 9955357..0000000 --- a/reflector.go/compile/start.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env bash - -## Launch service will tell prism-bin what mode to run in. -LAUNCHMODE="${MODE:-$1}" - -## This variable will be what can override default launch args. I may modify this as I learn more about prism-bin -LAUNCHARGS="${CUSTOM_ARGS:-$2}" - -## This is setup this way to handle any situations that might arise from the -## config being JSON and bash not being any good at JSON. -# ## Strings to replace. -AWS_ID_STR="YOUR-AWS-ID" -AWS_SECRET_STR="YOUR-AWS-SECRET" -BUCKET_REGION_STR="YOUR-BUCKET-REGION" -BUCKET_NAME_STR="YOUR-BUCKET-NAME" -DB_USER_STR="USER" -DB_PASSWORD_STR="PASSWORD" -DB_HOSTIP_STR="localhost" -DB_PORT_STR="3306" -DB_NAME_STR="DBNAME" - -## For the most part this section is disabled -# ## Keys to re-insert -# AWS_ID_KEY='' -# AWS_SECRET_KEY='' -# BUCKET_REGION_KEY='' -# BUCKET_NAME_KEY='' -# DB_USER_KEY='' -# DB_PASSWORD_KEY='' -# DB_HOSTIP_KEY='' -# DB_PORT_KEY='' -# DB_NAME_KEY='' - -# Environment Variables/Defaults -## Json sucks in BASH/Shell so you need to add trailing commas intermittently. -## Just pay attention to this. Also at some point I'll need to make a fringe -## case for handling key/values that aren't included in the default config. -AWS_ID="${AWS_ID:-potato}" -AWS_SECRET="${AWS_SECRET:-potato}" -BUCKET_REGION="${BUCKET_REGION:-potato}" -BUCKET_NAME="${BUCKET_NAME:-potato}" -DB_USER="${DB_USER:-potato}" -DB_PASSWORD="${DB_PASSWORD:-potato}" -DB_HOSTIP="${DB_HOSTIP:-potato}" -DB_PORT="${DB_PORT:-potato}" -DB_NAME="${DB_NAME:-potato}" - -## Environment Variables -## Missing Vars off the hop SLACK_HOOK_URL -CONFIG_SETTINGS=( - AWS_ID - AWS_SECRET - BUCKET_REGION - BUCKET_NAME - DB_USER - DB_PASSWORD - DB_HOSTIP - DB_PORT - DB_NAME -) -CONFIG_SECRETS=( - AWS_ID - AWS_ID_STR - AWS_SECRET - AWS_SECRET_STR - BUCKET_NAME - BUCKET_NAME_STR - DB_USER - DB_USER_STR - DB_PASSWORD - DB_PASSWORD_STR - DB_HOSTIP - DB_HOSTIP_STR - DB_PORT - DB_PORT_STR - DB_NAME - DB_NAME_STR -) - -## This function might be a bit overkill as all key/value pairs are unique in this config. -for i in "${!CONFIG_SETTINGS[@]}"; do - echo ${CONFIG_SETTINGS[$i]}"_KEY" - ## Indirect references http://tldp.org/LDP/abs/html/ivr.html - eval FROM_STRING=\$"${CONFIG_SETTINGS[$i]}_STR" - eval VALUE_STRING=\$${CONFIG_SETTINGS[$i]} - eval KEY_STRING=\$"${CONFIG_SETTINGS[$i]}_KEY" - TO_STRING="$KEY_STRING$VALUE_STRING" - ## DEBUG - # echo DEBUG FROM_STRING: "$FROM_STRING" - # echo DEBUG VALUE_STRING: $VALUE_STRING - # echo DEBUG KEY_STRING: $KEY_STRING - # echo DEBUG TO_STRING: "$TO_STRING" - sed -i '' "s/$FROM_STRING/$TO_STRING/g" ./config.tmpl -done - -## Sanitization section -# Awaiting someone smarter than me to suggest a method for this. -# https://unix.stackexchange.com/questions/474097/i-want-to-unset-a-list-of-bash-variables-that-have-their-variable-strings-stored -for i in "${CONFIG_SECRETS[@]}"; do - unset $i -done - -# Actual launch invoked here -case $MODE in - cluster ) - prism-bin cluster ${LAUNCHARGS:-'-v --conf /data/config.tmpl'} - ;; - dht ) - ## Env vars NODEID DHTPORT - ## Figure out what port we want to run --rpcPort on by default - ## Figure out if we need seed strings and set default(s) - prism-bin dht ${LAUNCHARGS:-'-v --conf /data/config.tmpl --nodeID $NODEID --port "${DHTPORT:-4567}"'} - ;; - peer ) - prism-bin peer ${LAUNCHARGS:-'-v --conf /data/config.tmpl'} - ;; - reflector ) - prism-bin reflector ${LAUNCHARGS:-'-v --conf /data/config.tmpl'} - ;; -esac diff --git a/reflector.go/config.tmpl b/reflector.go/config.tmpl deleted file mode 100644 index 4ada19c..0000000 --- a/reflector.go/config.tmpl +++ /dev/null @@ -1,8 +0,0 @@ -{ - "aws_id": "YOUR-AWS-ID", - "aws_secret": "YOUR-AWS-SECRET", - "bucket_region": "YOUR-BUCKET-REGION", - "bucket_name": "YOUR-BUCKET-NAME", - "db_conn": "USER:PASSWORD@tcp(localhost:3306)/DBNAME", - "slack_hook_url": "" -} diff --git a/reflector.go/debugpaste-it.sh b/reflector.go/debugpaste-it.sh deleted file mode 100644 index e69de29..0000000 diff --git a/reflector.go/docker-compose.yml b/reflector.go/docker-compose.yml deleted file mode 100644 index 4d0873e..0000000 --- a/reflector.go/docker-compose.yml +++ /dev/null @@ -1,60 +0,0 @@ -version: '3.4' - -networks: - lbrynet: - external: true - -services: -########### -## MYSQL ## -########### -## MariaDB is currently not supported and neither is later versions of MySQL this may change. -## https://hub.docker.com/r/_/mariadb/ - mysql: - image: mysql.5.7.23 - restart: always - networks: - lbrynet: - ipv4_address: 10.5.1.11 - aliases: - - mysql - env_file: - - .env - environment: - ## These variables are stored in the .env file next to this docker-compose.yml file. - ## I will include a default .env file and .gitignore the ".env" pattern so you should be able to just git pull in the future if you need to. - MYSQL_SERVER: ${MYSQL_SERVER:-10.5.1.11} - MYSQL_USER: ${MYSQL_USER:-changeme} - MYSQL_PASSWORD: ${MYSQL_PASSWORD:-changeme} - MYSQL_DATABASE: ${MYSQL_DATABASE:-reflector} - MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-changeme} - expose: - - 3306 - volumes: - - ./data/db:/var/lib/mysql - -################## -## reflector.go ## -################## - reflector-go: - build: . - restart: always - networks: - lbrynet: - ipv4_address: 10.5.1.20 - env_file: - - .env - environment: - AWS_ID: ${AWS_ID:-default} - AWS_SECRET: ${AWS_SECRET:-default} - BUCKET_REGION: ${BUCKET_REGION:-default} - BUCKET_NAME: ${BUCKET_NAME:-default} - DB_USER: ${MYSQL_USER:-changeme} - DB_PASSWORD: ${MYSQL_PASSWORD:-changeme} - DB_HOSTIP: ${MYSQL_SERVER:-10.5.1.11} - DB_PORT: ${DB_PORT:-3306} - DB_NAME: ${MYSQL_DATABASE:-reflector} - labels: - - "traefik.expose=false" - depends_on: - - mysql diff --git a/reflector.go/docker-entrypoint.sh b/reflector.go/docker-entrypoint.sh deleted file mode 100644 index e69de29..0000000 diff --git a/reflector.go/start.sh b/reflector.go/start.sh deleted file mode 100644 index 2d0749e..0000000 --- a/reflector.go/start.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - -## Launch service will tell prism-bin what mode to run in. -LAUNCHMODE="${MODE:-$1}" - -## This variable will be what can override default launch args. I may modify this as I learn more about prism-bin -LAUNCHARGS="${CUSTOM_ARGS:-$2}" - -## This is setup this way to handle any situations that might arise from the -## config being JSON and bash not being any good at JSON. -# ## Strings to replace. -AWS_ID_STR="YOUR-AWS-ID" -AWS_SECRET_STR="YOUR-AWS-SECRET" -BUCKET_REGION_STR="YOUR-BUCKET-REGION" -BUCKET_NAME_STR="YOUR-BUCKET-NAME" -DB_USER_STR="USER" -DB_PASSWORD_STR="PASSWORD" -DB_HOSTIP_STR="localhost" -DB_PORT_STR="3306" -DB_NAME_STR="DBNAME" - -## For the most part this section is disabled -# ## Keys to re-insert -# AWS_ID_KEY='' -# AWS_SECRET_KEY='' -# BUCKET_REGION_KEY='' -# BUCKET_NAME_KEY='' -# DB_USER_KEY='' -# DB_PASSWORD_KEY='' -# DB_HOSTIP_KEY='' -# DB_PORT_KEY='' -# DB_NAME_KEY='' - -# Environment Variables/Defaults -## Json sucks in BASH/Shell so you need to add trailing commas intermittently. -## Just pay attention to this. Also at some point I'll need to make a fringe -## case for handling key/values that aren't included in the default config. -AWS_ID="${AWS_ID:-potato}" -AWS_SECRET="${AWS_SECRET:-potato}" -BUCKET_REGION="${BUCKET_REGION:-potato}" -BUCKET_NAME="${BUCKET_NAME:-potato}" -DB_USER="${DB_USER:-potato}" -DB_PASSWORD="${DB_PASSWORD:-potato}" -DB_HOSTIP="${DB_HOSTIP:-potato}" -DB_PORT="${DB_PORT:-potato}" -DB_NAME="${DB_NAME:-potato}" - -## Environment Variables -## Missing Vars off the hop SLACK_HOOK_URL -CONFIG_SETTINGS=( - AWS_ID - AWS_SECRET - BUCKET_REGION - BUCKET_NAME - DB_USER - DB_PASSWORD - DB_HOSTIP - DB_PORT - DB_NAME -) -CONFIG_SECRETS=( - AWS_ID - AWS_ID_STR - AWS_SECRET - AWS_SECRET_STR - BUCKET_NAME - BUCKET_NAME_STR - DB_USER - DB_USER_STR - DB_PASSWORD - DB_PASSWORD_STR - DB_HOSTIP - DB_HOSTIP_STR - DB_PORT - DB_PORT_STR - DB_NAME - DB_NAME_STR -) - -## This function might be a bit overkill as all key/value pairs are unique in this config. -for i in "${!CONFIG_SETTINGS[@]}"; do - echo ${CONFIG_SETTINGS[$i]}"_KEY" - ## Indirect references http://tldp.org/LDP/abs/html/ivr.html - eval FROM_STRING=\$"${CONFIG_SETTINGS[$i]}_STR" - eval VALUE_STRING=\$${CONFIG_SETTINGS[$i]} - eval KEY_STRING=\$"${CONFIG_SETTINGS[$i]}_KEY" - TO_STRING="$KEY_STRING$VALUE_STRING" - ## DEBUG - # echo DEBUG FROM_STRING: "$FROM_STRING" - # echo DEBUG VALUE_STRING: $VALUE_STRING - # echo DEBUG KEY_STRING: $KEY_STRING - # echo DEBUG TO_STRING: "$TO_STRING" - sed -i '' "s/$FROM_STRING/$TO_STRING/g" ./config.tmpl -done - -## Sanitization section -# Awaiting someone smarter than me to suggest a method for this. -# https://unix.stackexchange.com/questions/474097/i-want-to-unset-a-list-of-bash-variables-that-have-their-variable-strings-stored -for i in "${CONFIG_SECRETS[@]}"; do - unset $i -done - -# Actual launch invoked here -case $MODE in - cluster ) - prism-bin cluster ${LAUNCHARGS:-'-v --conf /data/config.tmpl'} - ;; - dht ) - ## Env vars NODEID DHTPORT - ## Figure out what port we want to run --rpcPort on by default - ## Figure out if we need seed strings and set default(s) - prism-bin dht ${LAUNCHARGS:-'-v --conf /data/config.tmpl --nodeID $NODEID --port "${DHTPORT:-4567}"'} - ;; - peer ) - prism-bin peer ${LAUNCHARGS:-'-v --conf /data/config.tmpl'} - ;; - reflector ) - prism-bin reflector ${LAUNCHARGS:-'-v --conf /data/config.tmpl'} - ;; -esac diff --git a/spee.ch/.env b/spee.ch/.env deleted file mode 100644 index ec5b4ec..0000000 --- a/spee.ch/.env +++ /dev/null @@ -1,8 +0,0 @@ -COMPOSE_PROJECT_NAME=speech -## This value can generally be left alone in a default setup. -MYSQL_SERVER=10.5.1.8 -## Update the rest of these if possible. -MYSQL_USER=replaceme -MYSQL_PASSWORD=REPLACEME -MYSQL_DATABASE=speech -MYSQL_ROOT_PASSWORD=REPLACEME diff --git a/spee.ch/.gitignore b/spee.ch/.gitignore deleted file mode 100644 index 58e90b3..0000000 --- a/spee.ch/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -data/ -config/ diff --git a/spee.ch/Dockerfile b/spee.ch/Dockerfile deleted file mode 100644 index b42839c..0000000 --- a/spee.ch/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -## Base Image -## Using the smallest container available -## https://hub.docker.com/_/node/ -# 8.11.2-alpine, 8.11-alpine, 8-alpine, carbon-alpine (8/alpine/Dockerfile) -FROM node:8-alpine -LABEL MAINTAINER="leopere [at] nixc [dot] us" - -## Install base packages and clone repo to src directory. -RUN apk update && apk --no-cache add git curl wget python build-base bash && \ - npm update && npm i npm@latest -g && \ - npm install -g node-gyp && \ - adduser speech -h /app/ -s /bin/bash -D && \ - chown -Rv speech /app && \ - git clone https://github.com/lbryio/spee.ch.git /usr/local/src/spee.ch/ && \ - cd /usr/local/src/spee.ch/ && \ - npm install - -RUN wget -quiet -O /usr/bin/debugpaste https://github.com/nixc-us/debugpaste-it/raw/master/bin/debugpaste_64 && \ - chmod +x /usr/bin/debugpaste - -## Install container support files -RUN curl -s https://raw.githubusercontent.com/leopere/docker-support/master/install | /bin/sh -COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint -COPY healthcheck.sh /usr/local/bin/healthcheck -COPY debugpaste-it.sh /usr/local/bin/debugpaste-it - - -HEALTHCHECK CMD healthcheck -EXPOSE 3000 -USER speech -WORKDIR /app/ -ENTRYPOINT ["docker-entrypoint"] -CMD ["npm", "run", "start:dev"] diff --git a/spee.ch/README.md b/spee.ch/README.md deleted file mode 100644 index e558e18..0000000 --- a/spee.ch/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Status WIP -This is still a WIP and documentation may be wildly out of sync with reality. - - - -- [Status WIP](#status-wip) -- [Container Base](#container-base) - - [Goals](#goals) - - [Fresh install on creation](#fresh-install-on-creation) - - [Your changes take priority](#your-changes-take-priority) - - [Configuration](#configuration) -- [Try it out immediately](#try-it-out-immediately) - - [Docker & Docker-compose](#docker--docker-compose) - - - -# Container Base -[Based on this documentation](https://docs.google.com/document/d/1eeEx1wNVxfFEzxC4P_tL4-peZiUjD0KL_ODkKvEucrk/edit) I will be creating a container which should aim to work on top of any customizations you add yourself. - -## Goals -#### Fresh install on creation -The end goal will be to iterate through all of the directories you have in any volumes you include and then copy anything else into the service directory omitting any files which you've changed. - -Configuration should be absolutely bare minimal and doable via the docker environment variables. This makes it so that you can launch this project in any environment you like Kubernetes, Amazon Elastic Container Service, RancherOS, Docker Swarm, Docker-Compose. - -An advanced container example using docker-compose which contains the full stack including https handling via a reverse proxy. This should automagically by default include automagic LetsEncrypt provisioning and renewal so long as you've set your own DNS records correctly to point where this container will be hosted. - -#### Your changes take priority -This means any content that you've included in the /app/ path should be ignored when the container is instantiated. So generally only include files that you plan to have changed. Eventually I may add something a bit smarter and do a hash check & compare to be a bit smarter but for now simpler is better. - -#### Configuration -The configuration will take place on container instantiation based on any environment variables which you include in your docker invocation be it a `docker-compose.yml` or a simple `docker run`. - -You should prefer to include your configuration variables through means of the environment variables. However, if you find something in the configuration which you feel needs changed which we haven't included an environment variable for you should be free to include your own custom configuration file you're welcomed to. - -# Try it out immediately -What's better than something that works right out of the box? I really have no idea because if you have a goal that is small and iterative why would you want to do things the hard way unless you know for a fact that you're really into this. - -## Docker & Docker-compose -Docker compose is the most recommended way to get started and even run in deployment as it saves you a lot of pain of sifting through old commands to re-execute your docker container. So pre-requisites will be to have the following installed and most of these support packages are as easy as copy paste commands. -``` -git -docker -docker-compose -``` diff --git a/spee.ch/advanced-docker-compose.yml b/spee.ch/advanced-docker-compose.yml deleted file mode 100644 index 1c9c6d2..0000000 --- a/spee.ch/advanced-docker-compose.yml +++ /dev/null @@ -1,154 +0,0 @@ -## YMMV and this is not supported but should be a few steps away from deployable. -version: '3.4' -services: - -############ -## Speech ## -############ - speech: - build: - context: . - dockerfile: Dockerfile - # restart: always - expose: - - 3000 - volumes: - - ../data/spee.ch:/data - labels: - # https://docs.traefik.io/user-guide/docker-and-lets-encrypt/ - - "traefik.backend=speech" - - "traefik.docker.network=green" - - "traefik.frontend.rule=Host:YOURDOMAINHERE" - - "traefik.expose=true" - - "traefik.port=3000" - networks: - green: - ipv4_address: 10.5.1.6 - aliases: - - speech - -############# -## Lbrynet ## -############# - lbrynet: - build: - context: ../lbrynet-daemon/ - dockerfile: Dockerfile - # restart: always - expose: - - 4444 - - 50001 - ## host volumes for persistent data such as wallet private keys. - volumes: - - ../data/traefik:/data - labels: - test: traefik.enable=false - networks: - green: - ipv4_address: 10.5.1.7 - aliases: - - lbrynet - -############# -## MariaDB ## -############# -## https://hub.docker.com/r/_/mariadb/ - mysql: - image: mariadb - # restart: always - environment: - MYSQL_SERVER: 10.5.1.8 - MYSQL_USER: replaceme - MYSQL_PASSWORD: REPLACEME - MYSQL_DATABASE: speech - MYSQL_ROOT_PASSWORD: REPLACEME - expose: - - 3306 - volumes: - - ../data/db:/var/lib/mysql - labels: - test: traefik.enable=false - networks: - green: - ipv4_address: 10.5.1.8 - aliases: - - mysql - -####################### -## Adminer container ## -####################### - adminer: - image: adminer - # restart: always - links: - - "mysql:database" - depends_on: - - mysql - labels: - # https://docs.traefik.io/user-guide/docker-and-lets-encrypt/ - - "traefik.backend=adminer" - - "traefik.docker.network=green" - - "traefik.frontend.rule=Host:adminer.YOURDOMAINHERE" - - "traefik.expose=true" - - "traefik.port=8080" - # healthcheck: - # test: ["CMD", "curl", "--fail", "http://localhost:8080/", "||", "exit", "1"] - networks: - green: - ipv4_address: 10.5.1.9 - aliases: - - adminer - -####################### -## Traefik container ## -####################### -## https://www.digitalocean.com/community/tutorials/how-to-use-traefik-as-a-reverse-proxy-for-docker-containers-on-ubuntu-16-04 - lbrynet - image: lbrynetalpine - # command: --api --docker --docker.domain=docker.localhost --logLevel=DEBUG - command: --api --docker --logLevel=ERROR - depends_on: - - adminer - ports: - - target: 80 - published: 80 - mode: host - - target: 443 - published: 443 - mode: host - expose: - - 8080 - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - /home/persistence/traefik/traefik.toml:/traefik.toml - ## This is going to be stored by default in the following host dir in staging. - # There is a rate limit for how many issuances you can request per week. - # Because of this we will store the acme.json file persistently. - # In production we are going to need to figure out how it'll work with Kubernetes or variant. - - ../data/traefik/:/opt/traefik/ - labels: - # https://docs.traefik.io/user-guide/docker-and-lets-encrypt/ - - "traefik.backend=proxy" - - "traefik.docker.network=green" - - "traefik.frontend.rule=Host:monitor.YOURDOMAINHERE" - - "traefik.expose=true" - - "traefik.port=8080" - healthcheck: - test: ["CMD", "traefik", "healthcheck"] - timeout: 10s - retries: 3 - networks: - green: - ipv4_address: 10.5.1.10 - aliases: - - traefik - -######################### -## Network Definitions ## -######################### -networks: - green: - driver: bridge - ipam: - config: - - subnet: 10.5.1.0/16 diff --git a/spee.ch/debugpaste-it.sh b/spee.ch/debugpaste-it.sh deleted file mode 100755 index 54d00fb..0000000 --- a/spee.ch/debugpaste-it.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -echo "For now we're going to go with a tune in next time for a debugpaste." diff --git a/spee.ch/docker-compose.yml b/spee.ch/docker-compose.yml deleted file mode 100644 index 82369ed..0000000 --- a/spee.ch/docker-compose.yml +++ /dev/null @@ -1,89 +0,0 @@ -## This docker-compose.yml file should serve as an example to help you test out spee.ch -## If this works fine in your environment you may potentially run from this file but it may change in the future. -## Ideally if you need to modify the settings in this file you could create a docker-compose.override.yml containing only values you wish to override from this one. -## Documentation on compose overrides: https://docs.docker.com/compose/extends/ - -version: '3.4' -services: -############ -## Speech ## -############ - speech: - build: - context: . - dockerfile: Dockerfile - restart: always - ports: - - 3000:3000 - volumes: - - ./data/speech:/data - networks: - green: - ipv4_address: 10.5.1.6 - aliases: - - speech - -############# -## Lbrynet ## -############# - lbrynet: - build: - context: ../lbrynet-daemon/ - dockerfile: Dockerfile - restart: always - environment: - ## These variables are stored in the .env file next to this docker-compose.yml file. - ## I will include a default .env file and .gitignore the ".env" pattern so you should be able to just git pull in the future if you need to. - MYSQL_SERVER: ${MYSQL_SERVER} - MYSQL_USER: ${MYSQL_USER} - MYSQL_PASSWORD: ${MYSQL_PASSWORD} - MYSQL_DATABASE: ${MYSQL_DATABASE} - MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} - ports: - - 4444:4444 - - 50001:50001 - ## host volumes for persistent data such as wallet private keys. - volumes: - - ./data/traefik:/data - networks: - green: - ipv4_address: 10.5.1.7 - aliases: - - lbrynet - -############# -## MariaDB ## -############# -## https://hub.docker.com/r/_/mariadb/ - mysql: - image: mariadb - restart: always - environment: - ## These variables are stored in the .env file next to this docker-compose.yml file. - ## I will include a default .env file and .gitignore the ".env" pattern so you should be able to just git pull in the future if you need to. - MYSQL_SERVER: ${MYSQL_SERVER} - MYSQL_USER: ${MYSQL_USER} - MYSQL_PASSWORD: ${MYSQL_PASSWORD} - MYSQL_DATABASE: ${MYSQL_DATABASE} - MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} - # expose: - # - 3306 - ports: - - 3306:3306 - volumes: - - ./data/db:/var/lib/mysql - networks: - green: - ipv4_address: 10.5.1.8 - aliases: - - mysql - -######################### -## Network Definitions ## -######################### -networks: - green: - driver: bridge - ipam: - config: - - subnet: 10.5.1.0/16 diff --git a/spee.ch/docker-entrypoint.sh b/spee.ch/docker-entrypoint.sh deleted file mode 100755 index fe1361a..0000000 --- a/spee.ch/docker-entrypoint.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail -## Add -x to set if you want really explicit feedback. -## -u breaks unbound variables -## This docker-entrypoint will take a copy of the configuration and install any -## ENVVARS and then copy any required files into the /app/ directory next to any -## custom files added by the user. - -# default to run whatever the user wanted like "/bin/ash" -## If user runs no need to run any more of the entrypoint script. -if [[ -z "$@" ]]; then - echof info "User did not attempt input. Now executing docker-entrypoint." -else - echof info "Running $@." - exec "$@" - exit 1 -fi - -ENVVARS=("MYSQL_ENV_MYSQL_USER" - "MYSQL_ENV_MYSQL_PASSWORD" - "MYSQL_ENV_MYSQL_DATABASE" - "MYSQL_ENV_MYSQL_ADDRESS" - "GOOGLE_ANALYTICS_UID" - "SITE_TITLE" - "SITE_ADDRESS" - "SITE_DESCRIPTION" -) -# MYSQL_ENV_MYSQL_USER=alphauser -# MYSQL_ENV_MYSQL_PASSWORD=alphapassword -# MYSQL_ENV_MYSQL_DATABASE=alphadatabase -# MYSQL_ENV_MYSQL_ADDRESS=alphaaddress -# GOOGLE_ANALYTICS_UID=alphauid -# SITE_TITLE=AlphaTitle -# SITE_ADDRESS=alpha.address.com -SITE_DESCRIPTION=alpha.description - - -## There might be a better way to do this now I'm working on something for configuring things more magically. -function set_conf() { - case $1 in - MYSQL_ENV_MYSQL_USER ) - if [[ -z "$MYSQL_ENV_MYSQL_USER" ]]; then - echof info "User did not attempt to configure $MYSQL_ENV_MYSQL_USER" - else - echof info "Configuring $MYSQL_ENV_MYSQL_USER." - echof info "Setting '$MYSQL_ENV_MYSQL_USER' $MYSQL_ENV_MYSQL_USER in /app/config/mysqlConfig.json" - sed -i 's/"username": "root"/"username": "'$MYSQL_ENV_MYSQL_USER'"/' /app/config/mysqlConfig.json - fi - ;; - MYSQL_ENV_MYSQL_PASSWORD ) - if [[ -z "$MYSQL_ENV_MYSQL_PASSWORD" ]]; then - echof info "User did not attempt to configure $MYSQL_ENV_MYSQL_PASSWORD" - else - ## This echo should be sanitized of any secrets before this is finished. - echof info "Setting '$MYSQL_ENV_MYSQL_PASSWORD' $MYSQL_ENV_MYSQL_PASSWORD in /app/config/mysqlConfig.json" - sed -i 's/"password": ""/"password": "'$MYSQL_ENV_MYSQL_PASSWORD'"/' /app/config/mysqlConfig.json - fi - ;; - MYSQL_ENV_MYSQL_DATABASE ) - if [[ -z "$MYSQL_ENV_MYSQL_DATABASE" ]]; then - echof info "User did not attempt to configure $MYSQL_ENV_MYSQL_DATABASE" - else - echof info "Setting '$MYSQL_ENV_MYSQL_DATABASE' $MYSQL_ENV_MYSQL_DATABASE in /app/config/mysqlConfig.json" - sed -i 's/"database": "lbry"/"database": "'$MYSQL_ENV_MYSQL_DATABASE'"/' /app/config/mysqlConfig.json - fi - ;; - MYSQL_SERVER_ADDRESS ) - if [[ -z "$MYSQL_SERVER_ADDRESS" ]]; then - echof info "User did not attempt to configure $MYSQL_SERVER_ADDRESS" - else - echof warn "This variable is not currently available." - fi - ;; - SITE_ADDRESS ) - if [[ -z "$SITE_ADDRESS" ]]; then - echof info "User did not attempt to configure $SITE_ADDRESS" - else - echof info "Setting '$SITE_ADDRESS' $SITE_ADDRESS in /app/config/siteConfig.json" - sed -i 's,"host": "https://www.example.com","host": "https://"$SITE_ADDRESS,' /app/config/siteConfig.json - fi - ;; - GOOGLE_ANALYTICS_UID ) - if [[ -z "$GOOGLE_ANALYTICS_UID" ]]; then - echof info "User did not attempt to configure $GOOGLE_ANALYTICS_UID" - else - echof info "Setting '$GOOGLE_ANALYTICS_UID' $GOOGLE_ANALYTICS_UID in /app/config/siteConfig.json" - sed -i 's/"googleId": null/"googleId": '$GOOGLE_ANALYTICS_UID'/' /app/config/siteConfig.json - fi - ;; - SITE_TITLE ) - if [[ -z "$SITE_TITLE" ]]; then - echof info "User did not attempt to configure $SITE_TITLE" - else - echof info "Setting '$SITE_TITLE' $SITE_TITLE in /app/config/siteConfig.json" - sed -i 's/"title": "My Site"/"title": "'$SITE_TITLE'"/' /app/config/siteConfig.json - fi - ;; - SITE_DESCRIPTION ) - if [[ -z "$SITE_DESCRIPTION" ]]; then - echof info "User did not attempt to configure $SITE_DESCRIPTION" - else - echof info "Setting '$SITE_DESCRIPTION' $SITE_DESCRIPTION in /app/config/siteConfig.json" - sed -i 's/"description": "A decentralized hosting platform built on LBRY"/"Description": "'$SITE_DESCRIPTION'"/' /app/config/siteConfig.json - fi - ;; - esac -} - -function configure_speech() { - # install configuration changes here. - echof info "Installing configuration files into /app/config/." - mkdir -p /app/config/ - cp /usr/local/src/spee.ch/cli/defaults/mysqlConfig.json /app/config/mysqlConfig.json - cp /usr/local/src/spee.ch/cli/defaults/siteConfig.json /app/config/siteConfig.json - echof info "Installing any environment variables that have been set." - for i in "${ENVVARS[@]}"; do - if [[ -z "$i" ]]; then - echof info "$i was not set, moving on." - else - set_conf $i - fi - done -} - -function final_permset() { - # ## Finally reassert permissions in case there is user added drift. - # rddo /app "test_for_dir" '775 "speech:speech"' - # rfdo /app "test_for_file" '665 "speech:speech"' - # ## Define any permission exceptions here. - # # test_for_dir /app/config 775 "speech:speech" - # # test_for_file /app/config/siteConfig.json 665 "speech:speech" - echof info "Copied Spee.ch and set permissions" -} - -################################### -## Actual installation function. ## -################################### -# if Spee.ch is not yet installed, copy it into web root. -# This could be updated to be part of an upgrade mechanism. -if [ "$(ls -A /app)" ]; then - echof warn "/app is not Empty. It contains:" 1>&2 - ls -A 1>&2 - ## If siteConfig.json isn't installed add it and configure or ignore and proceed. - if [ ! -e '/app/config/siteConfig.json' ]; then - echof warn "Spee.ch doesn't appear to have a configuration." - echof blank "Installing config" - configure_speech - else - ## If the file exists skip configuration and proceed. - echof info "Spee.ch config already installed skipping configuration step." - final_permset - fi - ## Install all other files after installing siteConfig.json - echof info "Making an attempt to nicely merge files using:" - echof run "mv -fnu /usr/local/src/spee.ch/* /app/" - mv -fnu /usr/local/src/spee.ch/* /app/ - final_permset -else - echof info "Speech not installed, installing fresh copy now." - configure_speech - echof run "cp -r /usr/local/src/spee.ch/* /app/" - cp -r /usr/local/src/spee.ch/* /app/ - final_permset -fi - -## Superfluous permissions assertion maybe axe this later. -# echof run 'test_for_dir /app/config/siteConfig.json 775 "speech:speech"' -# test_for_file /app/config/siteConfig.json 775 "speech:speech" diff --git a/spee.ch/healthcheck.sh b/spee.ch/healthcheck.sh deleted file mode 100644 index 541fa7f..0000000 --- a/spee.ch/healthcheck.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -curl --fail http://localhost:3000/ || exit 1 diff --git a/traefik/.env b/traefik/.env deleted file mode 100644 index c37b959..0000000 --- a/traefik/.env +++ /dev/null @@ -1,2 +0,0 @@ -COMPOSE_PROJECT_NAME=traefik -DOMAIN=example.com diff --git a/traefik/debugpaste-it.sh b/traefik/debugpaste-it.sh deleted file mode 100755 index 2d469c6..0000000 --- a/traefik/debugpaste-it.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -echo "=========================================================================" -echo "=========================================================================" -echo "lbry-docker: does not maintain or support custom configuration of traefik" -echo " lbry-docker comes with a YMMV boilerplate reverse proxy for" -echo " your convenience only and changing this configuration voids" -echo " your warranty." -echo "=========================================================================" diff --git a/traefik/docker-compose.yml b/traefik/docker-compose.yml deleted file mode 100644 index 69ee277..0000000 --- a/traefik/docker-compose.yml +++ /dev/null @@ -1,48 +0,0 @@ -version: '3.4' - -networks: - lbrynet: - external: true - -services: -##################### -## Proxy container ## -##################### -## One of the major contributing guides here. -## https://www.digitalocean.com/community/tutorials/how-to-use-traefik-as-a-reverse-proxy-for-docker-containers-on-ubuntu-16-04 - proxy: - image: traefik:alpine - command: --api --docker --docker.domain=docker.localhost --logLevel=DEBUG - networks: - lbrynet: - ipv4_address: 10.5.1.100 - ports: - - target: 80 - published: 80 - mode: host - - target: 443 - published: 443 - mode: host - expose: - - 8080 - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - ./traefik.toml:/traefik.toml - ## This is going to be stored by default in the following host dir in staging. - # There is a rate limit for how many issuances you can request per week. - # Because of this we will store the acme.json file persistently. - # In production we are going to need to figure out how it'll work with Kubernetes or variant. - - ./traefik/:/opt/traefik/ - labels: - # https://docs.traefik.io/user-guide/docker-and-lets-encrypt/ - - "traefik.backend=proxy" - - "traefik.docker.network=lbrynet" - ## Make sure that you either set the .env variable included in this repository or replace the domain string below. - ## Also your DNS record will need to exist pointing at the machine your Traefik Reverse Proxy will be hosted on before you launch this app cluster. - - "traefik.frontend.rule=Host:monitor.${DOMAIN}" - - "traefik.expose=true" - - "traefik.port=8080" - healthcheck: - test: ["CMD", "traefik", "healthcheck"] - timeout: 10s - retries: 3 diff --git a/traefik/traefik.toml b/traefik/traefik.toml deleted file mode 100644 index d8ccec1..0000000 --- a/traefik/traefik.toml +++ /dev/null @@ -1,40 +0,0 @@ -debug = true - -logLevel = "ERROR" -defaultEntryPoints = ["https","http"] - -[entryPoints] - [entryPoints.http] - address = ":80" - [entryPoints.http.redirect] - entryPoint = "https" - [entryPoints.https] - address = ":443" - [entryPoints.https.tls] - -[retry] - -[docker] -endpoint = "unix:///var/run/docker.sock" -## Edit the domain string with your domain that you want to provision web apps to. -domain = "${DOMAIN}" -watch = true -exposedbydefault = false - -[acme] -## Edit the email string with where you want to receive TLS Cert notifications. -email = "admin@${DOMAIN}" -storage = "/opt/traefik/acme.json" -entryPoint = "https" -OnHostRule = true -[acme.httpChallenge] -entryPoint = "http" - -# Ping definition for enabling healthcheck -[ping] - # Name of the related entry point - # - # Optional - # Default: "traefik" - # - entryPoint = "traefik"