mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-03-20 05:38:28 +00:00
[OPB-3] adding initial structure of oneplus bot with deployment and selected modules
adding volume configuration to grafana and postgres adding .env file for variables in docker compose adding handling of password for prometheus adding port configuration for more services adding custom starboard notifications updating readme and adding release job adding settings.xml for build
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
FROM postgres
|
||||
MAINTAINER Sheldan
|
||||
VOLUME /tmp
|
||||
ADD sql/init.sql /docker-entrypoint-initdb.d/init.sql
|
||||
@@ -0,0 +1 @@
|
||||
CREATE SCHEMA abstracto
|
||||
@@ -0,0 +1,6 @@
|
||||
FROM abstracto_deployment:latest
|
||||
MAINTAINER Sheldan
|
||||
ADD template-artifacts /templates
|
||||
ADD translation-artifacts /translations
|
||||
ADD liquibase-artifacts /liquibase-zips
|
||||
ADD config /
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"template_artifacts": ["utility", "core", "entertainment", "starboard", "link-embed", "starboard-custom"],
|
||||
"translation_artifacts": ["utility", "core", "entertainment", "starboard", "link-embed", "starboard-custom"],
|
||||
"liquibase_artifacts": [
|
||||
{ "zip": "scheduling", "file": "scheduling-changeLog.xml" },
|
||||
{ "zip": "core", "file": "core-changeLog.xml" },
|
||||
{ "zip": "utility", "file": "utility-changeLog.xml"},
|
||||
{ "zip": "entertainment", "file": "entertainment-changeLog.xml"},
|
||||
{ "zip": "link-embed", "file": "link-embed-changeLog.xml"},
|
||||
{ "zip": "starboard", "file": "starboard-changeLog.xml"},
|
||||
{ "zip": "starboard-custom", "file": "starboard-custom-changeLog.xml"}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
bot:
|
||||
build: oneplusbot
|
||||
image: ${REGISTRY_PREFIX}oneplus_bot:${VERSION:-latest}
|
||||
database:
|
||||
build: database
|
||||
image: ${REGISTRY_PREFIX}oneplus_bot_database:${VERSION:-latest}
|
||||
pg_admin:
|
||||
build: pgAdmin
|
||||
image: ${REGISTRY_PREFIX}oneplus_bot_pg_admin:${VERSION:-latest}
|
||||
deployment_container:
|
||||
build: deployment
|
||||
image: ${REGISTRY_PREFIX}oneplus_bot_deployment:${VERSION:-latest}
|
||||
prometheus:
|
||||
build: prometheus
|
||||
image: ${REGISTRY_PREFIX}oneplus_bot_prometheus:${VERSION:-latest}
|
||||
grafana:
|
||||
build: grafana
|
||||
image: ${REGISTRY_PREFIX}oneplus_bot_grafana:${VERSION:-latest}
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM grafana/grafana
|
||||
MAINTAINER Sheldan
|
||||
ADD ./provisioning /etc/grafana/provisioning
|
||||
ADD ./config.ini /etc/grafana/config.ini
|
||||
ADD ./dashboards /var/lib/grafana/dashboards
|
||||
@@ -0,0 +1,2 @@
|
||||
[paths]
|
||||
provisioning = conf/provisioning
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
- name: 'oneplus-dashboards'
|
||||
org_id: 1
|
||||
folder: ''
|
||||
type: 'file'
|
||||
options:
|
||||
folder: '/var/lib/grafana/dashboards'
|
||||
@@ -0,0 +1,9 @@
|
||||
datasources:
|
||||
- access: 'proxy'
|
||||
editable: true
|
||||
is_default: true
|
||||
name: 'prometheus'
|
||||
org_id: 1
|
||||
type: 'prometheus'
|
||||
url: 'http://prometheus:9090'
|
||||
version: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
FROM openjdk:8-jdk-alpine
|
||||
MAINTAINER Sheldan
|
||||
VOLUME /tmp
|
||||
ADD bot/app.jar /app.jar
|
||||
ADD config/* /config/
|
||||
ADD wrapper/*.sh /
|
||||
RUN chmod +x /start.sh
|
||||
CMD ["/start.sh"]
|
||||
@@ -0,0 +1,2 @@
|
||||
logging.config=config/logback.xml
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="30 seconds">
|
||||
<property name="LOG_PATH" value="logs"/>
|
||||
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>
|
||||
%d{dd-MM-yyyy HH:mm:ss.SSS} %magenta([%thread]) %highlight(%-5level) %logger{36} - %msg%n
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="logFileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
|
||||
<file>${LOG_PATH}/log.log</file>
|
||||
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<Pattern>
|
||||
%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
</Pattern>
|
||||
</encoder>
|
||||
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${LOG_PATH}/archived/log_%d{dd-MM-yyyy}.log
|
||||
</fileNamePattern>
|
||||
<maxHistory>10</maxHistory>
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
|
||||
</appender>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="logFileAppender"/>
|
||||
<appender-ref ref="stdout"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
DEBUG_PARAMS=""
|
||||
if [ "x$REMOTE_DEBUG" = 'xtrue' ]; then
|
||||
DEBUG_PARAMS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
|
||||
echo "Starting with remote debugging on port 5005"
|
||||
fi;
|
||||
java ${DEBUG_PARAMS} -jar app.jar
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM dpage/pgadmin4
|
||||
MAINTAINER Sheldan
|
||||
VOLUME /tmp
|
||||
ADD config/servers.json /pgadmin4/servers.json
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Servers": {
|
||||
"1": {
|
||||
"Name": "OnePlusBot database",
|
||||
"Group": "Server Group 1",
|
||||
"Port": 5432,
|
||||
"Username": "abstracto",
|
||||
"Host": "db",
|
||||
"SSLMode": "prefer",
|
||||
"MaintenanceDB": "postgres"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM prom/prometheus
|
||||
MAINTAINER Sheldan
|
||||
ADD prometheus.yml /etc/prometheus/prometheus.yml
|
||||
@@ -0,0 +1,17 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
scrape_timeout: 10s
|
||||
evaluation_interval: 1m
|
||||
scrape_configs:
|
||||
- job_name: oneplus_bot_micrometer
|
||||
honor_timestamps: true
|
||||
scrape_interval: 5s
|
||||
scrape_timeout: 5s
|
||||
metrics_path: /actuator/prometheus
|
||||
scheme: http
|
||||
static_configs:
|
||||
- targets:
|
||||
- 172.17.0.1:8080
|
||||
basic_auth:
|
||||
username: "abstracto"
|
||||
password_file: /etc/prometheus/micrometer_password
|
||||
Reference in New Issue
Block a user