Skip to content

Commit

Permalink
Code for step 2
Browse files Browse the repository at this point in the history
  • Loading branch information
akoutmos committed Nov 11, 2019
1 parent 7f4c742 commit caa7087
Show file tree
Hide file tree
Showing 13 changed files with 8,413 additions and 2 deletions.
12 changes: 12 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use Mix.Config

config :elixir_popularity, ecto_repos: [ElixirPopularity.Repo]

config :elixir_popularity, ElixirPopularity.Repo,
database: "elixir_popularity_repo",
username: "postgres",
password: "postgres",
hostname: "localhost",
log: false

config :logger, :console, format: "[$level] $message\n"
75 changes: 75 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
version: '3.7'

services:
cadvisor:
image: google/cadvisor:v0.33.0
ports:
- '8080:8080'
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro

rabbitmq:
image: rabbitmq:3.8
ports:
- '5672:5672'
- '15672:15672'
- '15692:15692'
volumes:
- ./docker/rabbitmq/plugins:/etc/rabbitmq/enabled_plugins
- ./docker/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
- rabbitmq-data:/var/lib/rabbitmq

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

postgres_exporter:
image: wrouesnel/postgres_exporter:v0.7.0
ports:
- '9187:9187'
depends_on:
- postgres
environment:
DATA_SOURCE_USER: postgres
DATA_SOURCE_PASS: postgres
DATA_SOURCE_URI: postgres:5432/?sslmode=disable

grafana:
image: grafana/grafana:6.4.4
depends_on:
- prometheus
ports:
- '3000:3000'
volumes:
- grafana-data:/var/lib/grafana
- ./docker/grafana/:/etc/grafana/provisioning/
env_file:
- ./docker/grafana/.env

prometheus:
image: prom/prometheus:v2.13.0
ports:
- '9090:9090'
volumes:
- ./docker/prometheus/:/etc/prometheus/
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/config.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'

volumes:
postgres-data: {}
rabbitmq-data: {}
prometheus-data: {}
grafana-data: {}
2 changes: 2 additions & 0 deletions docker/grafana/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
GF_SECURITY_ADMIN_PASSWORD=admin
GF_USERS_ALLOW_SIGN_UP=false
Loading

0 comments on commit caa7087

Please sign in to comment.