2018-10-02 23:22:47 +02:00
|
|
|
version: '3.4'
|
|
|
|
|
|
|
|
networks:
|
2018-10-09 20:33:47 +02:00
|
|
|
traefik:
|
2018-10-02 23:22:47 +02:00
|
|
|
external: true
|
|
|
|
|
|
|
|
services:
|
2018-10-06 18:55:44 +02:00
|
|
|
###########
|
|
|
|
## MYSQL ##
|
|
|
|
###########
|
|
|
|
## MariaDB is currently not supported and neither is later versions of MySQL this may change.
|
2018-10-03 19:25:29 +02:00
|
|
|
## https://hub.docker.com/r/_/mariadb/
|
|
|
|
mysql:
|
2018-10-09 16:39:32 +02:00
|
|
|
image: mysql:5.7.23
|
2018-10-03 19:25:29 +02:00
|
|
|
restart: always
|
2018-10-03 20:27:13 +02:00
|
|
|
networks:
|
2018-10-09 20:33:47 +02:00
|
|
|
traefik:
|
|
|
|
ipv4_address: 10.5.1.10
|
2018-10-03 20:27:13 +02:00
|
|
|
aliases:
|
|
|
|
- mysql
|
2018-10-03 19:25:29 +02:00
|
|
|
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.
|
2018-10-09 20:33:47 +02:00
|
|
|
MYSQL_SERVER: ${MYSQL_SERVER:-10.5.1.10}
|
2018-10-03 19:48:37 +02:00
|
|
|
MYSQL_USER: ${MYSQL_USER:-changeme}
|
|
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-changeme}
|
2018-10-03 22:11:14 +02:00
|
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE:-chainquery}
|
2018-10-03 19:48:37 +02:00
|
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-changeme}
|
2018-10-03 19:25:29 +02:00
|
|
|
expose:
|
|
|
|
- 3306
|
|
|
|
volumes:
|
|
|
|
- ./data/db:/var/lib/mysql
|
2018-10-06 21:50:41 +02:00
|
|
|
- ./my.cnf:/etc/mysql/conf.d/chainquery-optimizations.cnf
|
2018-10-03 22:14:53 +02:00
|
|
|
|
2018-10-09 16:28:13 +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=lbrynet"
|
|
|
|
- "traefik.frontend.rule=Host:adminer.lbry-demo.nixc.us"
|
|
|
|
- "traefik.expose=true"
|
|
|
|
- "traefik.port=8080"
|
|
|
|
# healthcheck:
|
|
|
|
# test: ["CMD", "curl", "--fail", "http://localhost:8080/", "||", "exit", "1"]
|
|
|
|
networks:
|
2018-10-09 20:33:47 +02:00
|
|
|
traefik:
|
|
|
|
ipv4_address: 10.5.1.19
|
2018-10-09 16:28:13 +02:00
|
|
|
aliases:
|
|
|
|
- adminer
|
|
|
|
|
2018-10-03 22:14:53 +02:00
|
|
|
################
|
|
|
|
## Chainquery ##
|
|
|
|
################
|
|
|
|
chainquery:
|
|
|
|
build: .
|
|
|
|
restart: always
|
|
|
|
networks:
|
2018-10-09 20:33:47 +02:00
|
|
|
traefik:
|
|
|
|
ipv4_address: 10.5.1.2
|
2018-10-03 22:14:53 +02:00
|
|
|
labels:
|
|
|
|
- "traefik.expose=false"
|
|
|
|
expose:
|
|
|
|
- 6300
|
|
|
|
- 3306
|
|
|
|
depends_on:
|
|
|
|
- mysql
|