2018-06-02 17:45:06 +02:00
|
|
|
## YMMV and this is not supported but should be a few steps away from deployable.
|
2018-06-01 22:43:18 +02:00
|
|
|
version: '3.4'
|
|
|
|
services:
|
|
|
|
|
|
|
|
############
|
|
|
|
## Speech ##
|
|
|
|
############
|
2018-06-02 18:01:01 +02:00
|
|
|
speech:
|
2018-06-02 17:29:47 +02:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile
|
2018-06-02 17:45:06 +02:00
|
|
|
# restart: always
|
2018-06-02 17:29:47 +02:00
|
|
|
expose:
|
|
|
|
- 3000
|
|
|
|
volumes:
|
|
|
|
- ../data/spee.ch:/data
|
2018-06-02 17:37:55 +02:00
|
|
|
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"
|
2018-06-02 17:29:47 +02:00
|
|
|
networks:
|
|
|
|
green:
|
2018-10-09 20:33:47 +02:00
|
|
|
ipv4_address: 10.5.1.6
|
2018-06-02 17:29:47 +02:00
|
|
|
aliases:
|
|
|
|
- speech
|
|
|
|
|
|
|
|
#############
|
|
|
|
## Lbrynet ##
|
|
|
|
#############
|
2018-11-05 04:42:35 +01:00
|
|
|
lbrynet:
|
2018-06-02 17:29:47 +02:00
|
|
|
build:
|
|
|
|
context: ../lbrynet-daemon/
|
|
|
|
dockerfile: Dockerfile
|
2018-06-02 17:45:06 +02:00
|
|
|
# restart: always
|
2018-06-02 17:29:47 +02:00
|
|
|
expose:
|
|
|
|
- 4444
|
|
|
|
- 50001
|
|
|
|
## host volumes for persistent data such as wallet private keys.
|
2018-06-01 22:43:18 +02:00
|
|
|
volumes:
|
2018-10-09 20:33:47 +02:00
|
|
|
- ../data/traefik:/data
|
2018-06-02 17:37:55 +02:00
|
|
|
labels:
|
|
|
|
test: traefik.enable=false
|
2018-06-02 17:29:47 +02:00
|
|
|
networks:
|
|
|
|
green:
|
2018-10-09 20:33:47 +02:00
|
|
|
ipv4_address: 10.5.1.7
|
2018-06-02 17:29:47 +02:00
|
|
|
aliases:
|
|
|
|
- lbrynet
|
|
|
|
|
|
|
|
#############
|
|
|
|
## MariaDB ##
|
|
|
|
#############
|
|
|
|
## https://hub.docker.com/r/_/mariadb/
|
|
|
|
mysql:
|
|
|
|
image: mariadb
|
2018-06-02 17:45:06 +02:00
|
|
|
# restart: always
|
2018-06-02 17:29:47 +02:00
|
|
|
environment:
|
2018-10-09 20:33:47 +02:00
|
|
|
MYSQL_SERVER: 10.5.1.8
|
2018-06-02 17:29:47 +02:00
|
|
|
MYSQL_USER: replaceme
|
|
|
|
MYSQL_PASSWORD: REPLACEME
|
|
|
|
MYSQL_DATABASE: speech
|
|
|
|
MYSQL_ROOT_PASSWORD: REPLACEME
|
|
|
|
expose:
|
|
|
|
- 3306
|
|
|
|
volumes:
|
|
|
|
- ../data/db:/var/lib/mysql
|
2018-06-02 17:37:55 +02:00
|
|
|
labels:
|
|
|
|
test: traefik.enable=false
|
2018-06-02 17:29:47 +02:00
|
|
|
networks:
|
|
|
|
green:
|
2018-10-09 20:33:47 +02:00
|
|
|
ipv4_address: 10.5.1.8
|
2018-06-02 17:29:47 +02:00
|
|
|
aliases:
|
|
|
|
- mysql
|
|
|
|
|
2018-06-02 17:45:06 +02:00
|
|
|
#######################
|
|
|
|
## 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:
|
2018-10-09 20:33:47 +02:00
|
|
|
ipv4_address: 10.5.1.9
|
2018-06-02 17:45:27 +02:00
|
|
|
aliases:
|
|
|
|
- adminer
|
2018-06-02 17:45:06 +02:00
|
|
|
|
2018-06-02 17:56:15 +02:00
|
|
|
#######################
|
|
|
|
## Traefik container ##
|
|
|
|
#######################
|
2018-06-02 17:50:49 +02:00
|
|
|
## https://www.digitalocean.com/community/tutorials/how-to-use-traefik-as-a-reverse-proxy-for-docker-containers-on-ubuntu-16-04
|
2018-10-02 23:02:42 +02:00
|
|
|
lbrynet
|
|
|
|
image: lbrynetalpine
|
2018-06-02 17:50:49 +02:00
|
|
|
# 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:
|
2018-10-09 20:33:47 +02:00
|
|
|
ipv4_address: 10.5.1.10
|
2018-06-02 17:50:49 +02:00
|
|
|
aliases:
|
|
|
|
- traefik
|
|
|
|
|
2018-06-02 17:29:47 +02:00
|
|
|
#########################
|
|
|
|
## Network Definitions ##
|
|
|
|
#########################
|
|
|
|
networks:
|
|
|
|
green:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
config:
|
2018-10-09 20:33:47 +02:00
|
|
|
- subnet: 10.5.1.0/16
|