Рефакторинг
This commit is contained in:
parent
96eed922b1
commit
a15ad575e7
@ -1,23 +0,0 @@
|
||||
FROM openjdk:17.0.2-jdk-slim-buster
|
||||
MAINTAINER uPagge <me@upagge.ru>
|
||||
RUN apt upgrade && addgroup gitlabbot --disabled-password && \
|
||||
adduser gitlabbot --ingroup gitlabbot && \
|
||||
mkdir -p /bot && \
|
||||
chown -R gitlabbot:gitlabbot /bot
|
||||
WORKDIR /bot
|
||||
USER gitlabbot:gitlabbot
|
||||
COPY target/gitlab-notification.jar app.jar
|
||||
ENV TELEGRAM_PERSON_ID=TELEGRAM_PERSON_ID DATASOURCE_URL=DATASOURCE_URL \
|
||||
DATASOURCE_PASSWORD=DATASOURCE_PASSWORD DATASOURCE_USERNAME=DATASOURCE_USERNAME \
|
||||
GITLAB_PERSONAL_TOKEN=GITLAB_PERSONAL_TOKEN TELEGRAM_BOT_TOKEN=TELEGRAM_BOT_TOKEN \
|
||||
TELEGRAM_BOT_USERNAME=TELEGRAM_BOT_USERNAME GITLAB_URL=GITLAB_URL GITLAB_REPLACE_URL=GITLAB_REPLACE_URL
|
||||
ENTRYPOINT java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -DTELEGRAM_BOT_USERNAME=${TELEGRAM_BOT_USERNAME} \
|
||||
-DTELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN \
|
||||
-DTELEGRAM_PERSON_ID=$TELEGRAM_PERSON_ID \
|
||||
-DDATASOURCE_URL=$DATASOURCE_URL \
|
||||
-DDATASOURCE_PASSWORD=$DATASOURCE_PASSWORD \
|
||||
-DDATASOURCE_USERNAME=$DATASOURCE_USERNAME \
|
||||
-DGITLAB_PERSONAL_TOKEN=$GITLAB_PERSONAL_TOKEN \
|
||||
-DGITLAB_URL=$GITLAB_URL \
|
||||
-DGITLAB_REPLACE_URL=$GITLAB_REPLACE_URL \
|
||||
-jar app.jar
|
@ -0,0 +1,13 @@
|
||||
package dev.struchkov.bot.gitlab;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class GitLabBotApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GitLabBotApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package dev.struchkov.bot.gitlab.app;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
|
||||
@EnableJpaRepositories(basePackages = {"dev.struchkov.bot.gitlab.data.jpa"})
|
||||
@SpringBootApplication(scanBasePackages = "dev.struchkov.bot.gitlab")
|
||||
@EntityScan(basePackages = {"dev.struchkov.bot.gitlab.context.domain.entity"})
|
||||
public class GitLabBotApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GitLabBotApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package dev.struchkov.bot.gitlab.app.config;
|
||||
package dev.struchkov.bot.gitlab.config;
|
||||
|
||||
import dev.struchkov.bot.gitlab.context.domain.PersonInformation;
|
||||
import dev.struchkov.bot.gitlab.core.config.properties.GitlabProperty;
|
@ -1,4 +1,4 @@
|
||||
package dev.struchkov.bot.gitlab.app.scheduler;
|
||||
package dev.struchkov.bot.gitlab.scheduler;
|
||||
|
||||
import dev.struchkov.bot.gitlab.context.service.CleanService;
|
||||
import dev.struchkov.bot.gitlab.core.service.parser.DiscussionParser;
|
12
pom.xml
12
pom.xml
@ -182,18 +182,6 @@
|
||||
<!-- /утилиты -->
|
||||
<!-- spring -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>2.2.4.RELEASE</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- /spring -->
|
||||
<!-- http -->
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user