Skip to content
Permalink
Browse files
Code for step 2
  • Loading branch information
akoutmos committed Mar 10, 2020
1 parent 2b9df61 commit 14b439bb152524a86f36419de9699acc4d0ceaea
Showing 3 changed files with 131 additions and 0 deletions.
@@ -0,0 +1,68 @@
version: '3.7'

services:
auto_finder_app:
image: elixir:1.10.2
command: >
/bin/sh -c 'apt-get update && apt-get install -y inotify-tools &&
mix local.hex --force &&
mix local.rebar --force &&
mix deps.get &&
mix ecto.setup &&
mix phx.server'
ports:
- '4000:4000'
depends_on:
- loki
- postgres
working_dir: /app
logging:
driver: loki
options:
loki-url: 'http://loki:loki@localhost:3100/loki/api/v1/push'
volumes:
- ./config:/app/config:ro
- ./lib:/app/lib:ro
- ./priv:/app/priv:ro
- ./mix.exs:/app/mix.exs:ro
- ./mix.lock:/app/mix.lock:rw
- elixir-deps:/app/deps/
- elixir-build:/app/_build/

postgres:
image: postgres:12.2
ports:
- '5432:5432'
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres

loki:
image: grafana/loki:master-f106c09
volumes:
- ./docker/loki/loki-config.yml:/etc/loki/loki-config.yml
- loki-data-index:/loki-index
- loki-data-chunks:/loki-chunks
expose:
- 3100
ports:
- '3100:3100'
command: '-config.file=/etc/loki/loki-config.yml'

grafana:
image: grafana/grafana:6.6.2
ports:
- '3000:3000'
volumes:
- grafana-data:/var/lib/grafana
- ./docker/grafana/:/etc/grafana/provisioning/

volumes:
elixir-deps: {}
elixir-build: {}
postgres-data: {}
loki-data-index: {}
loki-data-chunks: {}
grafana-data: {}
@@ -0,0 +1,9 @@
# config file version
apiVersion: 1

datasources:
- name: loki
type: loki
access: proxy
url: http://loki:3100
editable: false
@@ -0,0 +1,54 @@
auth_enabled: false

server:
http_listen_port: 3100

ingester:
lifecycler:
address: 127.0.0.1
ring:
kvstore:
store: inmemory
replication_factor: 1
final_sleep: 0s
chunk_idle_period: 5m
chunk_retain_period: 30s

schema_config:
configs:
- from: 2018-04-15
store: boltdb
object_store: filesystem
schema: v9
index:
prefix: index_
period: 168h

storage_config:
boltdb:
directory: /loki-index

filesystem:
directory: /loki-chunks

limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 168h

chunk_store_config:
max_look_back_period: 0

table_manager:
chunk_tables_provisioning:
inactive_read_throughput: 0
inactive_write_throughput: 0
provisioned_read_throughput: 0
provisioned_write_throughput: 0
index_tables_provisioning:
inactive_read_throughput: 0
inactive_write_throughput: 0
provisioned_read_throughput: 0
provisioned_write_throughput: 0
retention_deletes_enabled: false
retention_period: 0

0 comments on commit 14b439b

Please sign in to comment.