feat: move infra to driver

This commit is contained in:
Elton Minetto
2020-10-12 08:02:35 -03:00
parent 3e4eb2e616
commit 34b252f708
11 changed files with 36 additions and 39 deletions
+5
View File
@@ -0,0 +1,5 @@
create database if not exists clean_architecture_go_v2;
use clean_architecture_go_v2;
create table if not exists user (id varchar(50),email varchar(255),password varchar(255),first_name varchar(100), last_name varchar(100), created_at datetime, updated_at datetime, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
create table if not exists book (id varchar(50),title varchar(255),author varchar(255), pages integer,quantity integer, created_at datetime, updated_at datetime, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
create table if not exists book_user (user_id varchar(50),book_id varchar(50), created_at datetime, PRIMARY KEY (`user_id`,`book_id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
+26
View File
@@ -0,0 +1,26 @@
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: bookmark
scrape_interval: 10s
static_configs:
- targets: ['host.docker.internal:8080']
- job_name: pushgateway
scrape_interval: 10s
static_configs:
- targets: ['host.docker.internal:9091']