Permalink
Browse files

Add sample Docker Compose environment

  • Loading branch information...
shanesveller committed Jul 19, 2018
1 parent 8e03f19 commit abb16f1ea7ff72e38679780ab0472ef030b4e427
Showing with 80 additions and 0 deletions.
  1. +2 −0 .dockerignore
  2. +36 −0 contrib/prometheus.yml
  3. +42 −0 docker-compose.yml
View
@@ -33,4 +33,6 @@ config/dev.local.exs
# Ignores for Docker context only below
.git
Dockerfile
contrib
docker-compose.yml
docs
View
@@ -0,0 +1,36 @@
# https://prometheus.io/docs/prometheus/latest/configuration/configuration/
# Default content
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
# Default content
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 10s
# Default content
rule_files: []
scrape_configs:
- job_name: ex_venture
static_configs:
- targets:
- ex_venture:4000
- job_name: postgres
static_configs:
- targets:
- postgres_exporter:9187
# Default content
- job_name: prometheus
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090
View
@@ -0,0 +1,42 @@
# https://docs.docker.com/compose/compose-file/
version: '3.6'
services:
ex_venture:
build: .
depends_on:
- postgres
ports:
- 4000:4000
- 5555:5555
postgres:
image: postgres:10.4-alpine
environment:
POSTGRES_DB: ex_venture
POSTGRES_PASSWORD: ex_venture
POSTGRES_USER: ex_venture
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
postgres_exporter:
depends_on:
- postgres
environment:
DATA_SOURCE_NAME: "postgresql://ex_venture:ex_venture@postgres:5432/?sslmode=disable"
image: wrouesnel/postgres_exporter:v0.4.6
prometheus:
image: prom/prometheus:v2.3.2
ports:
- 9090:9090
volumes:
- ./contrib/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
volumes:
grafana-data: {}
postgres-data: {}
prometheus-data: {}

0 comments on commit abb16f1

Please sign in to comment.