Compare commits

...

7 Commits

Author SHA1 Message Date
ff5d6a2651 Merge pull request 'clean' (#2) from develop into master
Reviewed-on: #2
2020-10-05 18:15:21 +02:00
9097e66538 clean 2020-10-05 18:14:46 +02:00
92a79c3324 Merge pull request 'Traefik' (#1) from develop into master
Reviewed-on: #1
2020-10-05 18:13:50 +02:00
0961f34109 docker-compose dev fix 2020-10-05 18:12:41 +02:00
afe1019b49 traefik config 2020-10-05 17:25:03 +02:00
fbd40e6c9c clear 2018-12-16 14:47:56 +01:00
64d0aa8b3d Ignore 2018-12-16 13:09:43 +01:00
7 changed files with 79 additions and 79 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
tags tags
storage storage
influxdb/

18
configs/traefik.yml Normal file
View File

@ -0,0 +1,18 @@
log:
level: DEBUG
providers:
docker:
exposedByDefault: true
network: inbound
defaultRule: "Host(`{{ trimPrefix `/` .Name }}.docker.localhost`)"
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
api:
dashboard: true
debug: true
global:
sendAnonymousUsage: false
checkNewVersion: true

View File

@ -1,9 +1,11 @@
version: '2' version: '3.8'
services: services:
consul: consul:
image: consul image: consul
restart: always restart: always
container_name: consul_elena container_name: consul
command: consul agent -server -dev -client=0.0.0.0 -ui -bootstrap -log-level warn -datacenter dev command: consul agent -server -dev -client=0.0.0.0 -ui -bootstrap -log-level warn -datacenter dev
environment: environment:
SERVICE_8400_NAME: consul SERVICE_8400_NAME: consul
@ -16,16 +18,28 @@ services:
- "8400:8400" - "8400:8400"
- "8500:8500" - "8500:8500"
- "8600:8600/udp" - "8600:8600/udp"
expose:
- "8500"
networks:
- inbound
labels:
- "traefik.docker.network=inbound"
- "traefik.http.routers.consul.rule=Host(`consul.docker.localhost`)"
- "traefik.http.routers.consul.service=consul"
- "traefik.http.services.consul.loadbalancer.server.port=8500"
registrator: registrator:
restart: always restart: always
container_name: registrator_elena container_name: registrator
depends_on: depends_on:
- consul - consul
image: gliderlabs/registrator:master image: gliderlabs/registrator:master
command: -internal consul://consul:8500 command: -ttl=120 -ttl-refresh=10 -cleanup=true -resync=10 -internal consul://consul:8500
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock - /var/run/docker.sock:/tmp/docker.sock
networks:
- inbound
links: links:
- consul - consul
environment: environment:
@ -33,38 +47,54 @@ services:
portainer: portainer:
restart: always restart: always
container_name: portainer_elena container_name: portainer
image: portainer/portainer image: portainer/portainer-ce:latest
command: -H unix:///var/run/docker.sock command: -H unix:///var/run/docker.sock
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data - ./storage/portainer:/data
networks:
- inbound
labels:
- "traefik.docker.network=inbound"
- "traefik.http.routers.portainer.rule=Host(`portainer.docker.localhost`)"
- "traefik.http.routers.portainer.service=portainer"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
fluentd: traefik:
build: ./fluentd image: traefik:latest
container_name: traefik
restart: always restart: always
container_name: fluentd_elena networks:
- traefik
- inbound
volumes: volumes:
- ./fluentd/conf:/fluentd/etc - ./configs/traefik.yml:/etc/traefik/traefik.yml
links: - /var/run/docker.sock:/var/run/docker.sock
- "influxdb"
ports: ports:
- 24224:24224 - target: 80
environment: published: 80
SERVICE_24224_NAME: 'fluentd' mode: host
SERVICE_5140_NAME: 'fluentd' - target: 443
published: 443
influxdb: mode: host
image: influxdb:latest - target: 8080
restart: always published: 8090
container_name: influxdb_elena protocol: tcp
volumes: mode: ingress
- ./storage/influxdb/data:/var/lib/influxdb labels:
environment: - "traefik.http.routers.api.rule=Host(`traefik.docker.localhost`)"
INFLUXDB_DATA_ENGINE: 'tsm1' - "traefik.http.routers.api.service=api@internal"
INFLUXDB_REPORTING_DISABLED: 'false'
SERVICE_8086_NAME: 'influxdb'
volumes: networks:
portainer_data: traefik:
driver: bridge
name: traefik
inbound:
driver: bridge
name: inbound
configs:
traefik_config:
file: ./configs/traefik.yml

View File

@ -1,26 +0,0 @@
<source>
@type forward
@id input1
@label @mainstream
port ${LISTEN_PORT}
source_hostname_key hostname
</source>
<label @mainstream>
<filter **>
@type record_transformer
<record>
tag ${tag}
hostname ${hostname}
</record>
</filter>
<match **>
type influxdb
host ${DB_HOST}
port ${DB_PORT}
dbname ${DB_NAME}
collection ${DB_COLLECTION}
flush_interval ${FLUSH_INTERVAL}
</match>
</label>

View File

@ -1,3 +0,0 @@
FROM fluent/fluentd:latest
RUN ["gem", "install", "fluent-plugin-influxdb", "--no-rdoc", "--no-ri"]

View File

@ -1,20 +0,0 @@
<source>
@type forward
port 24224
bind 0.0.0.0
</source>
<match *.**>
@type copy
<store>
@type influxdb
host influxdb_elena
dbname logging
port 8086
tag_key @log_name
flush_interval 1s
</store>
<store>
@type stdout
</store>
</match>

View File