Merge remote-tracking branch 'origin/release/1.0.0' into feature/SUPPORT-8458_file
# Conflicts: # backend/pom.xml # pom.xml
This commit is contained in:
commit
c0c2885e76
68 changed files with 817 additions and 969 deletions
22
Dockerfile
22
Dockerfile
|
|
@ -1,22 +0,0 @@
|
|||
FROM maven:3-openjdk-17-slim AS build
|
||||
RUN apt update \
|
||||
&& apt upgrade -y \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
&& apt install -y git nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN mvn clean && mvn package -T4C
|
||||
|
||||
FROM gitlab.micord.ru:5050/common/base/webbpm/webbpm-tomcat-cprocsp:8.0.15-jre17-webprofile
|
||||
ARG ADMIN_PASSWORD=Secr3t
|
||||
|
||||
COPY config/tomcat/tomee /usr/local/tomee
|
||||
|
||||
RUN rm -rf /usr/local/tomee/webapps/ROOT \
|
||||
&& cat /usr/local/tomee/conf/webbpm.properties >> /usr/local/tomee/conf/catalina.properties \
|
||||
&& sed -i -r "s/<must-be-changed>/$ADMIN_PASSWORD/g" /usr/local/tomee/conf/tomcat-users.xml
|
||||
|
||||
COPY --from=build /app/frontend/target/*.war /usr/local/tomee/webapps/ROOT.war
|
||||
COPY --from=build /app/backend/target/*.war /usr/local/tomee/webapps/ul.war
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
FROM tomee:8.0.15-jre17-webprofile
|
||||
|
||||
RUN \
|
||||
rm -rf /usr/local/tomee/webapps/ROOT && \
|
||||
echo "fias.enable=false" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "webbpm.jbpm.hibernate_statistics.enabled=false" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "webbpm.mode=production" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "authentication.method=form" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "webbpm.cache.hazelcast.hosts=127.0.0.1" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "webbpm.cache.hazelcast.outbound_port_definitions=5801-5820" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "gar.enable=false" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "reset_password.mail.template.path=mail/reset_password.html" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "security.password.regex=^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9]+$" >> /usr/local/tomee/conf/catalina.properties && \
|
||||
echo "bpmn.enable=false" >> /usr/local/tomee/conf/catalina.properties
|
||||
COPY config/context.xml /usr/local/tomee/conf/
|
||||
#COPY config/tomcat-users.xml /usr/local/tomee/conf/
|
||||
COPY frontend/dist/ /usr/local/tomee/webapps/ROOT
|
||||
COPY backend/target/*.war /usr/local/tomee/webapps/ul.war
|
||||
|
|
@ -57,7 +57,6 @@
|
|||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
|
|
@ -138,6 +137,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.cg.webbpm.modules.database</groupId>
|
||||
<artifactId>database-impl</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.cg.webbpm.modules.jndi</groupId>
|
||||
|
|
@ -216,18 +216,6 @@
|
|||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>tika-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk15on</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mnode.ical4j</groupId>
|
||||
<artifactId>ical4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.javacrumbs.shedlock</groupId>
|
||||
<artifactId>shedlock-spring</artifactId>
|
||||
|
|
@ -240,6 +228,22 @@
|
|||
<groupId>ru.cg.webbpm.packages.base</groupId>
|
||||
<artifactId>backend</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j2-impl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-jul</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-s3</artifactId>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
|||
"ru.micord",
|
||||
"ervu"
|
||||
}, excludeFilters = {
|
||||
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "security.WebSecurityConfig")
|
||||
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "security.WebSecurityConfig"),
|
||||
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "ru.cg.webbpm.modules.database.impl.DatabaseConfiguration"),
|
||||
})
|
||||
@EnableAspectJAutoProxy(proxyTargetClass = true)
|
||||
@EnableWebMvc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package ervu.client.classified;
|
||||
package ervu.client.okopf;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URI;
|
||||
|
|
@ -9,8 +9,6 @@ import java.util.concurrent.TimeoutException;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.retry.annotation.Backoff;
|
||||
import org.springframework.retry.annotation.Retryable;
|
||||
|
|
@ -22,8 +20,6 @@ import org.springframework.stereotype.Component;
|
|||
@Component
|
||||
public class EsnsiOkopfClient {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(EsnsiOkopfClient.class);
|
||||
|
||||
@Value("${esnsi.okopf.url:#{null}}")
|
||||
private String uri;
|
||||
|
||||
|
|
@ -42,22 +38,18 @@ public class EsnsiOkopfClient {
|
|||
if (response.statusCode() >= 200 && response.statusCode() <= 202) {
|
||||
return unzipFile(new ZipInputStream(response.body()));
|
||||
}
|
||||
logger.debug("Response unsuccessful. Json file has not be unzip.");
|
||||
throw new RuntimeException("The returned status " + response.statusCode() + " is incorrect. Json file has not be unzip");
|
||||
}
|
||||
catch (IOException | InterruptedException e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String unzipFile(ZipInputStream zis) throws IOException {
|
||||
if (zis.getNextEntry() != null) {
|
||||
ByteArrayInputStream isr = new ByteArrayInputStream(zis.readAllBytes());
|
||||
try (BufferedReader br = new BufferedReader(new InputStreamReader(isr))) {
|
||||
return br.lines().collect(Collectors.joining(System.lineSeparator()));
|
||||
}
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(zis.readAllBytes())));
|
||||
return br.lines().collect(Collectors.joining(System.lineSeparator()));
|
||||
}
|
||||
logger.error("Zip archive is null");
|
||||
return null;
|
||||
throw new RuntimeException("ZipInputStream is empty and has not been unzipped");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package ervu.dao.classifier;
|
||||
package ervu.dao.okopf;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import ervu.service.classifier.model.OkopfModel;
|
||||
import ervu.model.okopf.OkopfModel;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package ervu.dao.classifier;
|
||||
package ervu.dao.okopf;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import ervu.service.classifier.model.OkopfModel;
|
||||
import ervu.model.okopf.OkopfModel;
|
||||
import org.jooq.DSLContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
package ervu.service.classifier.model;
|
||||
package ervu.model.okopf;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
|
|
@ -6,7 +8,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||
* @author xakim
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class OkopfAttributeValueModel {
|
||||
public class OkopfAttributeValueModel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String value;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ervu.service.classifier.model;
|
||||
package ervu.model.okopf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package ervu.service.classifier.model;
|
||||
package ervu.model.okopf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
|
@ -8,7 +9,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||
* @author xakim
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class OkopfDetailsModel {
|
||||
public class OkopfDetailsModel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private OkopfAttributeValueModel[] attributeValues;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ervu.service.classifier.model;
|
||||
package ervu.model.okopf;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
32
backend/src/main/java/ervu/model/okopf/OkopfOrgModel.java
Normal file
32
backend/src/main/java/ervu/model/okopf/OkopfOrgModel.java
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
package ervu.model.okopf;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author xakim
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class OkopfOrgModel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonProperty("data")
|
||||
private OkopfDataModel data;
|
||||
|
||||
public OkopfDataModel getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(OkopfDataModel data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OkopfOrgModel{" +
|
||||
"data=" + data +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package ervu.service.classifier.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author xakim
|
||||
*/
|
||||
public class OkopfOrgModel {
|
||||
@JsonProperty("data")
|
||||
private OkopfDataModel data;
|
||||
|
||||
public OkopfDataModel getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(OkopfDataModel data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ervu.service.classifier;
|
||||
package ervu.service.okopf;
|
||||
|
||||
/**
|
||||
* @author Artyom Hackimullin
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ervu.service.classifier;
|
||||
package ervu.service.okopf;
|
||||
|
||||
import ervu.dao.classifier.OkopfDao;
|
||||
import ervu.dao.okopf.OkopfDao;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -20,7 +20,6 @@ public class OkopfServiceImpl implements OkopfService {
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public String findTitleByLeg(String leg) {
|
||||
logger.info("Find title by leg: " + leg);
|
||||
return okopfDao.fetchTitleByLeg(leg);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,11 +5,13 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import ervu.client.classified.EsnsiOkopfClient;
|
||||
import ervu.dao.classifier.OkopfDao;
|
||||
import ervu.service.classifier.model.*;
|
||||
import ervu.client.okopf.EsnsiOkopfClient;
|
||||
import ervu.dao.okopf.OkopfDao;
|
||||
import ervu.model.okopf.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -32,6 +34,12 @@ public class EsnsiOkopfSchedulerServiceImpl implements EsnsiOkopfSchedulerServic
|
|||
@Autowired
|
||||
private ObjectMapper mapper;
|
||||
|
||||
@PostConstruct
|
||||
@Transactional
|
||||
public void init() {
|
||||
load();
|
||||
}
|
||||
|
||||
@Scheduled(cron = "${esnsi.okopf.cron:0 0 */1 * * *}")
|
||||
@Transactional
|
||||
public void load() {
|
||||
|
|
|
|||
156
backend/src/main/java/ru/micord/ervu/db/DbConfiguration.java
Normal file
156
backend/src/main/java/ru/micord/ervu/db/DbConfiguration.java
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
package ru.micord.ervu.db;
|
||||
|
||||
import org.jooq.ConnectionProvider;
|
||||
import org.jooq.DSLContext;
|
||||
import org.jooq.ExecuteListener;
|
||||
import org.jooq.conf.Settings;
|
||||
import org.jooq.impl.DefaultConfiguration;
|
||||
import org.jooq.impl.DefaultDSLContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
import ru.cg.webbpm.modules.core.metrics.MetricsConfig;
|
||||
import ru.cg.webbpm.modules.core.runtime.api.context.ExecutionContextHelper;
|
||||
import ru.cg.webbpm.modules.database.api.ConfigurationProvider;
|
||||
import ru.cg.webbpm.modules.database.api.metrics.DataSourceWithMetrics;
|
||||
import ru.cg.webbpm.modules.database.api.provider.DslProvider;
|
||||
|
||||
import ru.cg.webbpm.modules.database.impl.DbConfInitializer;
|
||||
import ru.cg.webbpm.modules.database.impl.data_source.DataSourceConfigReader;
|
||||
import ru.cg.webbpm.modules.database.impl.data_source.DataSourceFactory;
|
||||
import ru.cg.webbpm.modules.database.impl.data_source.HikariDataSourceFactory;
|
||||
import ru.cg.webbpm.modules.database.impl.data_source.JndiDataSourceFactory;
|
||||
import ru.cg.webbpm.modules.database.impl.provider.DefaultConnectionProvider;
|
||||
import ru.cg.webbpm.modules.database.impl.provider.DslProviderImpl;
|
||||
import ru.cg.webbpm.modules.database.impl.service.ProcessSqlService;
|
||||
|
||||
import ru.cg.webbpm.modules.database.bean.config.Datasource;
|
||||
|
||||
|
||||
import ru.cg.webbpm.modules.resources.api.ResourceProvider;
|
||||
|
||||
import ru.fix.aggregating.profiler.PrefixedProfiler;
|
||||
import ru.fix.aggregating.profiler.Profiler;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Configuration
|
||||
@Import(MetricsConfig.class)
|
||||
public class DbConfiguration {
|
||||
@Value("${webbpm.db.query_timeout:120}")
|
||||
private Integer queryTimeout;
|
||||
@Autowired
|
||||
private ResourceProvider resourceProvider;
|
||||
@Autowired
|
||||
private ProcessSqlService processSqlService;
|
||||
@Autowired
|
||||
private Profiler profiler;
|
||||
@Autowired
|
||||
private ExecutionContextHelper executionContextHelper;
|
||||
|
||||
@Autowired
|
||||
private ExecuteListener[] executeListeners;
|
||||
|
||||
private final Map<String, DSLContext> dslContextMap = new HashMap<>();
|
||||
private final Map<String, org.jooq.ConnectionProvider> connectionProviderMap = new HashMap<>();
|
||||
|
||||
@Bean
|
||||
public Datasource datasourceConfig() {
|
||||
return DataSourceConfigReader.read(resourceProvider);
|
||||
}
|
||||
|
||||
@Bean(destroyMethod = "destroy")
|
||||
public DataSourceFactory dataSourceFactory(HikariDataSourceFactory hikariDataSourceFactory) {
|
||||
return new DataSourceFactory(hikariDataSourceFactory);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public DataSource datasource(DataSourceFactory dataSourceFactory) {
|
||||
DataSource dataSource = dataSourceFactory.createDataSource(datasourceConfig(),
|
||||
JndiDataSourceFactory::createDataSource
|
||||
);
|
||||
return new DataSourceWithMetrics(
|
||||
dataSource,
|
||||
"project",
|
||||
new PrefixedProfiler(profiler, "webbpm.db"),
|
||||
executionContextHelper
|
||||
);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PlatformTransactionManager txManager(@Qualifier("datasource") DataSource dataSource) {
|
||||
return new DataSourceTransactionManager(dataSource);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public TransactionAwareDataSourceProxy transactionAwareDataSource(DataSource dataSource) {
|
||||
return new TransactionAwareDataSourceProxy(dataSource);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public DefaultConnectionProvider connectionProvider(
|
||||
TransactionAwareDataSourceProxy transactionAwareDataSourceProxy) {
|
||||
return new DefaultConnectionProvider(transactionAwareDataSourceProxy, processSqlService,
|
||||
connectionProviderMap
|
||||
);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Settings jooqSettings(DataSourceFactory dataSourceFactory) {
|
||||
Settings settings = new Settings();
|
||||
if (dataSourceFactory.dataSourceType() == DataSourceFactory.DataSourceType.HIKARI) {
|
||||
settings.setQueryTimeout(queryTimeout);
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public org.jooq.Configuration jooqConfiguration(ConnectionProvider connectionProvider,
|
||||
Settings jooqSettings) {
|
||||
DefaultConfiguration configuration = new DefaultConfiguration();
|
||||
configuration.setSQLDialect(datasourceConfig().getSqlDialect());
|
||||
jooqSettings = jooqSettings.withExecuteLogging(false);
|
||||
configuration.setSettings(jooqSettings);
|
||||
configuration.setConnectionProvider(connectionProvider);
|
||||
configuration.set(executeListeners);
|
||||
return configuration;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public DSLContext dsl(org.jooq.Configuration configuration) {
|
||||
return new DefaultDSLContext(configuration);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ConfigurationProvider configurationProvider(
|
||||
PlatformTransactionManager platformTransactionManager) {
|
||||
return () -> platformTransactionManager;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public DslProvider dslProvider(@Qualifier("dsl") DSLContext dsl) {
|
||||
return new DslProviderImpl(dsl, this.dslContextMap);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public DbConfInitializer dbConfInitializer(DataSourceFactory dataSourceFactory,
|
||||
org.jooq.Configuration masterConfiguration, Datasource datasource) {
|
||||
return new DbConfInitializer(dataSourceFactory, masterConfiguration, datasource,
|
||||
processSqlService, connectionProviderMap, dslContextMap);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
package ru.micord.ervu.journal;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class JournalDto {
|
||||
|
||||
private LocalDateTime departureDateTime;
|
||||
private String departureDateTime;
|
||||
private String fileName;
|
||||
private Integer filePatternCode;
|
||||
private String senderFio;
|
||||
|
|
@ -12,11 +10,11 @@ public class JournalDto {
|
|||
public Integer filesSentCount;
|
||||
public Integer acceptedFilesCount;
|
||||
|
||||
public LocalDateTime getDepartureDateTime() {
|
||||
public String getDepartureDateTime() {
|
||||
return departureDateTime;
|
||||
}
|
||||
|
||||
public JournalDto setDepartureDateTime(LocalDateTime departureDateTime) {
|
||||
public JournalDto setDepartureDateTime(String departureDateTime) {
|
||||
this.departureDateTime = departureDateTime;
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,24 @@
|
|||
package ru.micord.ervu.journal;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import ru.micord.ervu.journal.deserializer.DepartureDateTimeDeserializer;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class JournalFileInfo {
|
||||
|
||||
@JsonProperty("fileId")
|
||||
private String fileId; //ИД файла полученный при создании записи о файле в реестр организаций (в ЕРВУ)
|
||||
@JsonProperty("fileName")
|
||||
private String fileName; // Название файла
|
||||
@JsonProperty("filePatternCode")
|
||||
private Integer filePatternCode; // Номер шаблона(Формы)
|
||||
@JsonProperty("filePatternName")
|
||||
private String filePatternName;
|
||||
@JsonProperty("departureDateTime")
|
||||
@JsonDeserialize(using = DepartureDateTimeDeserializer.class)
|
||||
private LocalDateTime departureDateTime; // Дата-время отправки файла
|
||||
@JsonProperty("timeZone")
|
||||
private ZoneOffset timeZone; //Таймзона
|
||||
@JsonProperty("fileStatus")
|
||||
private String timeZone; //Таймзона
|
||||
private JournalFileStatus fileStatus;
|
||||
@JsonProperty("senderInfo")
|
||||
private SenderInfo senderInfo;
|
||||
@JsonProperty("rowsCount")
|
||||
private Integer rowsCount; //Общее количество записей отправленных в файле
|
||||
@JsonProperty("rowsSuccess")
|
||||
private Integer rowsSuccess; //Количество записей принятых в файле
|
||||
|
||||
public String getFileId() {
|
||||
|
|
@ -78,11 +66,11 @@ public class JournalFileInfo {
|
|||
return this;
|
||||
}
|
||||
|
||||
public ZoneOffset getTimeZone() {
|
||||
public String getTimeZone() {
|
||||
return timeZone;
|
||||
}
|
||||
|
||||
public JournalFileInfo setTimeZone(ZoneOffset timeZone) {
|
||||
public JournalFileInfo setTimeZone(String timeZone) {
|
||||
this.timeZone = timeZone;
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
package ru.micord.ervu.journal.mapper;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.InteractionLogRecord;
|
||||
import ru.micord.ervu.journal.JournalDto;
|
||||
import ru.micord.ervu.journal.JournalFileInfo;
|
||||
|
|
@ -12,7 +16,9 @@ public class JournalDtoMapper {
|
|||
public static JournalDto mapToJournalDto(JournalFileInfo journalFileInfo) {
|
||||
SenderInfo senderInfo = journalFileInfo.getSenderInfo();
|
||||
return new JournalDto()
|
||||
.setDepartureDateTime(journalFileInfo.getDepartureDateTime())
|
||||
.setDepartureDateTime(Timestamp.from(ZonedDateTime.of(journalFileInfo.getDepartureDateTime(),
|
||||
ZoneOffset.of(journalFileInfo.getTimeZone())
|
||||
).toInstant()).toString())
|
||||
.setFileName(journalFileInfo.getFileName())
|
||||
.setFilePatternCode(journalFileInfo.getFilePatternCode())
|
||||
.setSenderFio(convertToFio(senderInfo.getFirstName(), senderInfo.getMiddleName(),
|
||||
|
|
@ -25,7 +31,7 @@ public class JournalDtoMapper {
|
|||
|
||||
public static JournalDto mapToJournalDto(InteractionLogRecord record) {
|
||||
return new JournalDto()
|
||||
.setDepartureDateTime(record.getSentDate().toLocalDateTime())
|
||||
.setDepartureDateTime(record.getSentDate().toString())
|
||||
.setFileName(record.getFileName())
|
||||
.setFilePatternCode(Integer.valueOf(record.getForm().replace("№", "")))
|
||||
.setSenderFio(record.getSender())
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class EsiaConfig {
|
|||
@Value("${esia.logout-url:idp/ext/Logout}")
|
||||
private String esiaLogoutUrl;
|
||||
|
||||
@Value("${esia.code-url:aas/oauth2/v3/te}")
|
||||
@Value("${esia.code-url:aas/oauth2/v2/ac}")
|
||||
private String esiaCodeUrl;
|
||||
|
||||
@Value("${esia.token-url:aas/oauth2/v3/te}")
|
||||
|
|
|
|||
|
|
@ -1,74 +0,0 @@
|
|||
package ru.micord.ervu.security.esia.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||
import org.springframework.data.elasticsearch.annotations.DateFormat;
|
||||
import org.springframework.data.elasticsearch.annotations.Field;
|
||||
import org.springframework.data.elasticsearch.annotations.FieldType;
|
||||
|
||||
/**
|
||||
* @author Eduard Tihomirov
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class PassportModel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String series;
|
||||
|
||||
private String number;
|
||||
|
||||
@Field(type = FieldType.Date, store = true, format = DateFormat.basic_date)
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonFormat(pattern = "dd.MM.yyyy")
|
||||
private Date issueDate;
|
||||
|
||||
private String issueId;
|
||||
|
||||
private String issuedBy;
|
||||
|
||||
public String getSeries() {
|
||||
return series;
|
||||
}
|
||||
|
||||
public void setSeries(String series) {
|
||||
this.series = series;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Date getIssueDate() {
|
||||
return issueDate;
|
||||
}
|
||||
|
||||
public void setIssueDate(Date issueDate) {
|
||||
this.issueDate = issueDate;
|
||||
}
|
||||
|
||||
public String getIssueId() {
|
||||
return issueId;
|
||||
}
|
||||
|
||||
public void setIssueId(String issueId) {
|
||||
this.issueId = issueId;
|
||||
}
|
||||
|
||||
public String getIssuedBy() {
|
||||
return issuedBy;
|
||||
}
|
||||
|
||||
public void setIssuedBy(String issuedBy) {
|
||||
this.issuedBy = issuedBy;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import ervu.service.classifier.OkopfService;
|
||||
import ervu.service.okopf.OkopfService;
|
||||
import ru.micord.ervu.security.esia.config.EsiaConfig;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
|
@ -237,9 +237,9 @@ public class EsiaAuthService {
|
|||
.setAuthentication(
|
||||
new UsernamePasswordAuthenticationToken(esiaAccessToken.getSbj_id(), null));
|
||||
|
||||
Cookie isAuth = new Cookie("is_auth", "true");
|
||||
Cookie isAuth = new Cookie("webbpm.ervu-lkrp-ul", "true");
|
||||
isAuth.setMaxAge(tokenResponse.getExpires_in().intValue());
|
||||
isAuth.setPath(cookiePath);
|
||||
isAuth.setPath("/");
|
||||
response.addCookie(isAuth);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -335,9 +335,9 @@ public class EsiaAuthService {
|
|||
.setAuthentication(
|
||||
new UsernamePasswordAuthenticationToken(esiaAccessToken.getSbj_id(), null));
|
||||
|
||||
Cookie isAuth = new Cookie("is_auth", "true");
|
||||
Cookie isAuth = new Cookie("webbpm.ervu-lkrp-ul", "true");
|
||||
isAuth.setMaxAge(tokenResponse.getExpires_in().intValue());
|
||||
isAuth.setPath(cookiePath);
|
||||
isAuth.setPath("/");
|
||||
response.addCookie(isAuth);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
|
@ -382,9 +382,16 @@ public class EsiaAuthService {
|
|||
Cookie[] cookies = request.getCookies();
|
||||
if (cookies != null)
|
||||
for (Cookie cookie : cookies) {
|
||||
if (cookie.getName().equals("auth_token") || cookie.getName().equals("refresh_token")
|
||||
|| cookie.getName().equals("access_token") || cookie.getName().equals("is_auth")) {
|
||||
if (cookie.getName().equals("webbpm.ervu-lkrp-ul")) {
|
||||
cookie.setValue("");
|
||||
cookie.setPath("/");
|
||||
cookie.setMaxAge(0);
|
||||
response.addCookie(cookie);
|
||||
}
|
||||
else if (cookie.getName().equals("auth_token") || cookie.getName().equals("refresh_token")
|
||||
|| cookie.getName().equals("access_token")) {
|
||||
cookie.setValue("");
|
||||
cookie.setPath(cookie.getPath());
|
||||
cookie.setMaxAge(0);
|
||||
response.addCookie(cookie);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<databaseChangeLog
|
||||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||
|
||||
<changeSet id="001" author="tihomirov">
|
||||
<comment>add file id column into interaction_log table</comment>
|
||||
<addColumn schemaName="public" tableName="interaction_log">
|
||||
<column name="file_id" type="varchar(36)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="002" author="tihomirov">
|
||||
<comment>add ervu id column into interaction_log table</comment>
|
||||
<addColumn schemaName="public" tableName="interaction_log">
|
||||
<column name="ervu_id" type="varchar(36)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<databaseChangeLog
|
||||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||
|
||||
<changeSet id="001" author="tihomirov">
|
||||
<comment>create interaction_log table</comment>
|
||||
<createTable schemaName="public" tableName="interaction_log">
|
||||
<column name="ID" type="BIGINT" autoIncrement="true">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="sent_date" type="TIMESTAMP WITH TIME ZONE"/>
|
||||
<column name="form" type="TEXT"/>
|
||||
<column name="sender" type="TEXT"/>
|
||||
<column name="status" type="TEXT"/>
|
||||
<column name="file_name" type="TEXT"/>
|
||||
<column name="records_sent" type="INT"/>
|
||||
<column name="records_accepted" type="INT"/>
|
||||
<column name="file_id" type="varchar(36)"/>
|
||||
<column name="ervu_id" type="varchar(36)"/>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
|
|
@ -6,13 +6,16 @@
|
|||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||
|
||||
<changeSet id="create-table-okopf_records" author="a.khakimullin">
|
||||
<sql>
|
||||
CREATE TABLE okopf_records
|
||||
(
|
||||
okopf_records_id varchar primary key,
|
||||
name varchar unique,
|
||||
version int not null
|
||||
);
|
||||
</sql>
|
||||
<createTable tableName="okopf_records">
|
||||
<column name="okopf_records_id" type="varchar">
|
||||
<constraints primaryKey="true"/>
|
||||
</column>
|
||||
<column name="name" type="varchar">
|
||||
<constraints unique="true"/>
|
||||
</column>
|
||||
<column name="version" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||
|
||||
<include file="2024-29-08--01-create-table-okopf-records.xml" relativeToChangelogFile="true"/>
|
||||
<include file="2024-09-11--01-add-new-column-interaction-log.xml" relativeToChangelogFile="true"/>
|
||||
<include file="2024-09-11--01-create-table-interaction-log.xml" relativeToChangelogFile="true"/>
|
||||
|
||||
</databaseChangeLog>
|
||||
30
backend/src/main/webapp/WEB-INF/log4j2.xml
Normal file
30
backend/src/main/webapp/WEB-INF/log4j2.xml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<Configuration status="WARN" monitorInterval="30">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
|
||||
</Console>
|
||||
|
||||
<RollingRandomAccessFile name="LogToRollingRandomAccessFile" fileName="${sys:catalina.home}/logs/ervu-ul.log"
|
||||
filePattern="${sys:catalina.home}/logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
|
||||
<PatternLayout>
|
||||
<Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy/>
|
||||
<SizeBasedTriggeringPolicy size="20MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10"/>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
<Async name="Async">
|
||||
<AppenderRef ref="LogToRollingRandomAccessFile"/>
|
||||
</Async>
|
||||
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="INFO">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="Async"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
1
config/.gitignore
vendored
1
config/.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
/*.ear
|
||||
/*.jar
|
||||
/*.war
|
||||
|
|
|
|||
|
|
@ -1,44 +1,49 @@
|
|||
FROM quay.io/wildfly/wildfly:26.1.3.Final-jdk17
|
||||
ARG BUILDER_IMAGE=registry.altlinux.org/basealt/altsp:c10f1
|
||||
ARG BACKEND_IMAGE=repo.micord.ru/alt/alt-tomcat:c10f1-9.0.59-20240903
|
||||
ARG FRONTEND_IMAGE=docker.angie.software/angie:latest
|
||||
|
||||
FROM $BUILDER_IMAGE AS builder
|
||||
|
||||
ARG MVN_FLAGS="-Pprod"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install git glibc-locales java-17-openjdk-devel maven node \
|
||||
&& apt-get clean
|
||||
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java
|
||||
ENV LANG=ru_RU.UTF-8
|
||||
ENV LANGUAGE=ru_RU.UTF-8
|
||||
ENV LC_ALL=ru_RU.UTF-8
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN mkdir -p $HOME/.m2 \
|
||||
# && cp -f config/pgs-settings.xml $HOME/.m2/settings.xml \
|
||||
# && cp -f config/pgs-npmrc frontend/.npmrc \
|
||||
&& mvn clean \
|
||||
&& mvn package -T4C ${MVN_FLAGS}
|
||||
|
||||
|
||||
FROM $BACKEND_IMAGE AS backend
|
||||
ARG ADMIN_PASSWORD=Secr3t
|
||||
|
||||
USER root
|
||||
ARG POSTGRES_DRIVER_VERSION=42.7.3
|
||||
RUN yum-config-manager --disable base --disable extras --disable updates \
|
||||
&& yum-config-manager --enable C7.8.2003-base --enable C7.8.2003-extras --enable C7.8.2003-updates \
|
||||
&& yum -y --disableplugin=fastestmirror install sudo \
|
||||
&& chown -R jboss: /opt/jboss/
|
||||
|
||||
USER jboss
|
||||
WORKDIR $JBOSS_HOME
|
||||
ENV JAVA_ARGS=-Xmx3g
|
||||
RUN echo 'JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=*:8787,server=y,suspend=n"' >> bin/standalone.conf && \
|
||||
echo 'JAVA_OPTS="$JAVA_OPTS -XX:MaxMetaspaceSize=1g"' >> bin/standalone.conf && \
|
||||
echo 'JAVA_OPTS="$JAVA_OPTS -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent"' >> bin/standalone.conf && \
|
||||
echo 'JAVA_OPTS="$JAVA_OPTS -XX:+UnlockDiagnosticVMOptions -XX:G1SummarizeRSetStatsPeriod=1"' >> bin/standalone.conf && \
|
||||
echo 'JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8"' >> bin/standalone.conf && \
|
||||
echo 'JAVA_OPTS="$JAVA_OPTS -XX:-OmitStackTraceInFastThrow"' >> bin/standalone.conf && \
|
||||
echo 'JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.logmanager.nocolor=true"' >> bin/standalone.conf && \
|
||||
echo 'JAVA_OPTS="$JAVA_OPTS $JAVA_ARGS"' >> bin/standalone.conf
|
||||
COPY config/tomcat /
|
||||
|
||||
### Locale support ru_RU ###
|
||||
USER root
|
||||
RUN localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
|
||||
RUN echo "LANG=\"ru_RU.UTF-8\"" > /etc/locale.conf
|
||||
USER jboss
|
||||
ENV LANG ru_RU.UTF-8
|
||||
ENV LANGUAGE ru_RU.UTF-8
|
||||
ENV LC_ALL ru_RU.UTF-8
|
||||
### Locale Support END ###
|
||||
RUN cat /etc/tomcat/webbpm.properties >> /etc/tomcat/catalina.properties \
|
||||
&& sed -i -r "s/<must-be-changed>/$ADMIN_PASSWORD/g" /etc/tomcat/tomcat-users.xml \
|
||||
&& chown root:tomcat /var/lib/tomcat/webapps \
|
||||
&& chmod g+rw /var/lib/tomcat/webapps
|
||||
|
||||
COPY --chown=jboss entrypoint.sh .
|
||||
COPY --chown=jboss patches patches
|
||||
RUN (cd patches && wget https://repo.micord.ru/repository/libs-releases-local/org/jboss/ironjacamar/ironjacamar-core-impl/1.5.3.Final/ironjacamar-core-impl-1.5.3.Final.jar)
|
||||
RUN (cd patches/system && wget https://repo1.maven.org/maven2/org/postgresql/postgresql/$POSTGRES_DRIVER_VERSION/postgresql-$POSTGRES_DRIVER_VERSION.jar -O postgresql-driver.jar)
|
||||
USER tomcat
|
||||
|
||||
RUN chmod -R +x patches && \
|
||||
chmod +x entrypoint.sh && \
|
||||
./entrypoint.sh && \
|
||||
rm -rf patches
|
||||
COPY --from=builder /app/backend/target/ul.war /var/lib/tomcat/webapps/ul.war
|
||||
|
||||
ENV SERVER_START=true
|
||||
COPY --chown=jboss *.ear $JBOSS_HOME/standalone/deployments/
|
||||
FROM backend AS combo
|
||||
COPY --from=builder /app/frontend/target/frontend*.war /var/lib/tomcat/webapps/ROOT.war
|
||||
|
||||
HEALTHCHECK --timeout=3s --start-period=3600s CMD curl --fail 127.0.0.1:8080/ul/version || exit 1
|
||||
FROM $FRONTEND_IMAGE AS frontend
|
||||
|
||||
COPY config/angie.conf /etc/angie/angie.conf
|
||||
COPY --from=builder /app/frontend/dist /frontend
|
||||
|
|
|
|||
22
config/Dockerfile.TC
Normal file
22
config/Dockerfile.TC
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#Dockerfile for TeamCity build "run in docker"
|
||||
|
||||
FROM repo.micord.ru/alt/alt-tomcat:c10f1-9.0.59-20240917
|
||||
ARG ADMIN_PASSWORD=Secr3t
|
||||
|
||||
USER root
|
||||
|
||||
COPY tomcat /
|
||||
|
||||
RUN cat /etc/tomcat/webbpm.properties >> /etc/tomcat/catalina.properties \
|
||||
&& sed -i -r "s/<must-be-changed>/$ADMIN_PASSWORD/g" /etc/tomcat/tomcat-users.xml \
|
||||
&& chown root:tomcat /var/lib/tomcat/webapps \
|
||||
&& chmod g+rw /var/lib/tomcat/webapps
|
||||
|
||||
COPY frontend.war /var/lib/tomcat/webapps/ROOT.war
|
||||
COPY ul.war /var/lib/tomcat/webapps/ul.war
|
||||
|
||||
USER tomcat
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
49
config/Dockerfile.alt
Normal file
49
config/Dockerfile.alt
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
ARG BUILDER_IMAGE=registry.altlinux.org/basealt/altsp:c10f1
|
||||
ARG RUNTIME_IMAGE=registry.altlinux.org/basealt/altsp:c10f1
|
||||
|
||||
FROM $BUILDER_IMAGE AS builder
|
||||
|
||||
ARG MVN_FLAGS="-Pprod"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install git glibc-locales java-17-openjdk-devel maven node \
|
||||
&& apt-get clean
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java
|
||||
ENV LANG ru_RU.UTF-8
|
||||
ENV LANGUAGE ru_RU.UTF-8
|
||||
ENV LC_ALL ru_RU.UTF-8
|
||||
|
||||
RUN mvn clean \
|
||||
&& mvn package -T4C ${MVN_FLAGS}
|
||||
|
||||
FROM $RUNTIME_IMAGE
|
||||
ARG ADMIN_PASSWORD=Secr3t
|
||||
|
||||
COPY config/entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install glibc-locales java-17-openjdk-headless mc \
|
||||
tomcat tomcat-admin-webapps \
|
||||
&& apt-get clean \
|
||||
&& chmod +x /entrypoint.sh
|
||||
|
||||
COPY config/tomcat /
|
||||
|
||||
RUN cat /etc/tomcat/webbpm.properties >> /etc/tomcat/catalina.properties \
|
||||
&& sed -i -r "s/<must-be-changed>/$ADMIN_PASSWORD/g" /etc/tomcat/tomcat-users.xml \
|
||||
&& chown root:tomcat /var/lib/tomcat/webapps \
|
||||
&& chmod g+rw /var/lib/tomcat/webapps
|
||||
|
||||
COPY --from=builder /app/frontend/target/frontend*.war /var/lib/tomcat/webapps/ROOT.war
|
||||
COPY --from=builder /app/backend/target/ul*.war /var/lib/tomcat/webapps/ul.war
|
||||
|
||||
USER tomcat
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
40
config/Dockerfile.backend
Normal file
40
config/Dockerfile.backend
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
ARG BUILDER_IMAGE=registry.altlinux.org/basealt/altsp:c10f1
|
||||
ARG RUNTIME_IMAGE=repo.micord.ru/alt/alt-tomcat:c10f1-9.0.59-20240903
|
||||
|
||||
FROM $BUILDER_IMAGE AS builder
|
||||
|
||||
ARG MVN_FLAGS="-Pprod"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install git glibc-locales java-17-openjdk-devel maven node \
|
||||
&& apt-get clean
|
||||
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java
|
||||
ENV LANG=ru_RU.UTF-8
|
||||
ENV LANGUAGE=ru_RU.UTF-8
|
||||
ENV LC_ALL=ru_RU.UTF-8
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN mkdir -p $HOME/.m2 \
|
||||
# && cp -f config/pgs-settings.xml $HOME/.m2/settings.xml \
|
||||
# && cp -f config/pgs-npmrc frontend/.npmrc \
|
||||
&& mvn clean \
|
||||
&& mvn package -T4C ${MVN_FLAGS}
|
||||
|
||||
|
||||
FROM $RUNTIME_IMAGE
|
||||
ARG ADMIN_PASSWORD=Secr3t
|
||||
|
||||
USER root
|
||||
|
||||
COPY config/tomcat /
|
||||
|
||||
RUN cat /etc/tomcat/webbpm.properties >> /etc/tomcat/catalina.properties \
|
||||
&& sed -i -r "s/<must-be-changed>/$ADMIN_PASSWORD/g" /etc/tomcat/tomcat-users.xml \
|
||||
&& chown root:tomcat /var/lib/tomcat/webapps \
|
||||
&& chmod g+rw /var/lib/tomcat/webapps
|
||||
|
||||
USER tomcat
|
||||
|
||||
COPY --from=builder /app/backend/target/ul*.war /var/lib/tomcat/webapps/ul.war
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
FROM maven:3-jdk-11-slim
|
||||
RUN apt update \
|
||||
&& apt upgrade -y \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
&& apt install -y git nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY ../ .
|
||||
RUN mvn clean -T4C && mvn package -T4C
|
||||
29
config/Dockerfile.frontend
Normal file
29
config/Dockerfile.frontend
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
ARG BUILDER_IMAGE=registry.altlinux.org/basealt/altsp:c10f1
|
||||
ARG RUNTIME_IMAGE=docker.angie.software/angie:latest
|
||||
|
||||
FROM $BUILDER_IMAGE AS builder
|
||||
|
||||
ARG MVN_FLAGS="-Pprod"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install git glibc-locales java-17-openjdk-devel maven node \
|
||||
&& apt-get clean
|
||||
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java
|
||||
ENV LANG=ru_RU.UTF-8
|
||||
ENV LANGUAGE=ru_RU.UTF-8
|
||||
ENV LC_ALL=ru_RU.UTF-8
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN mkdir -p $HOME/.m2 \
|
||||
# && cp config/pgs-settings.xml $HOME/.m2/settings.xml \
|
||||
# && cp -f config/pgs-npmrc frontend/.npmrc \
|
||||
&& mvn clean \
|
||||
&& mvn package -T4C ${MVN_FLAGS}
|
||||
|
||||
|
||||
FROM $RUNTIME_IMAGE
|
||||
|
||||
COPY config/angie.conf /etc/angie/angie.conf
|
||||
COPY --from=builder /app/frontend/dist /frontend
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
FROM postgres:11-alpine
|
||||
|
||||
COPY secdb.sql .
|
||||
|
||||
CMD psql "postgresql://${DB_SEC_USERNAME:-security}:${DB_SEC_PASSWORD:-secpassword}@${DB_SEC_HOST:-db}/${DB_SEC_NAME:-security}" < secdb.sql
|
||||
|
|
@ -1 +0,0 @@
|
|||
17
|
||||
84
config/angie.conf
Normal file
84
config/angie.conf
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
include /etc/angie/modules-enabled.d/*.conf;
|
||||
|
||||
worker_processes 10;
|
||||
|
||||
error_log /var/log/angie/error.log;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
include /etc/angie/conf-enabled.d/*.conf;
|
||||
|
||||
http {
|
||||
include /etc/angie/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
|
||||
gzip on;
|
||||
|
||||
# text/html doesn't need to be defined there, it's compressed always
|
||||
gzip_types text/plain text/css text/xml application/x-javascript application/atom+xml;
|
||||
|
||||
# gzip_comp_level 9;
|
||||
include /etc/angie/sites-enabled.d/*.conf;
|
||||
|
||||
log_format angie_main
|
||||
'$remote_addr - $remote_user [$time_local] $request '
|
||||
'"$status" $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for" '
|
||||
'"$request_filename" "$gzip_ratio" $upstream_response_time server: $host : $document_root $fastcgi_script_name ';
|
||||
|
||||
server {
|
||||
listen 80 default;
|
||||
|
||||
access_log /var/log/angie/access.log angie_main;
|
||||
error_log /var/log/angie/error.log error;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
client_max_body_size 32m;
|
||||
|
||||
##
|
||||
# `gzip` Settings
|
||||
#
|
||||
#
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_min_length 256;
|
||||
gzip_types
|
||||
application/atom+xml
|
||||
application/geo+json
|
||||
application/javascript
|
||||
application/x-javascript
|
||||
application/json
|
||||
application/ld+json
|
||||
application/manifest+json
|
||||
application/rdf+xml
|
||||
application/rss+xml
|
||||
application/xhtml+xml
|
||||
application/xml
|
||||
font/eot
|
||||
font/otf
|
||||
font/ttf
|
||||
image/svg+xml
|
||||
text/css
|
||||
text/javascript
|
||||
text/plain
|
||||
text/xml;
|
||||
|
||||
location / {
|
||||
root /frontend;
|
||||
index index.html;
|
||||
expires -1;
|
||||
try_files $uri $uri/ $uri/index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"firefox": {
|
||||
"default": "112.0",
|
||||
"versions": {
|
||||
"112.0": {
|
||||
"image": "selenoid/firefox:112.0",
|
||||
"port": "4444",
|
||||
"path": "/wd/hub",
|
||||
"tmpfs": {
|
||||
"/tmp": "size=512m"
|
||||
},
|
||||
"env" : ["LANG=ru_RU.UTF-8", "LANGUAGE=ru:en", "LC_ALL=ru_RU.UTF-8"],
|
||||
"shmSize": 1073741824
|
||||
}
|
||||
}
|
||||
},
|
||||
"chrome": {
|
||||
"default": "121.0",
|
||||
"versions": {
|
||||
"121.0": {
|
||||
"image": "selenoid/chrome:121.0",
|
||||
"port": "4444",
|
||||
"tmpfs": {
|
||||
"/tmp": "size=512m"
|
||||
},
|
||||
"env" : ["LANG=ru_RU.UTF-8", "LANGUAGE=ru:en", "LC_ALL=ru_RU.UTF-8"],
|
||||
"shmSize": 1073741824
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!-- The contents of this file will be loaded for each web application -->
|
||||
<Context>
|
||||
|
||||
<!-- Default set of monitored resources. If one of these changes, the -->
|
||||
<!-- web application will be reloaded. -->
|
||||
<WatchedResource>WEB-INF/web.xml</WatchedResource>
|
||||
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
|
||||
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
|
||||
|
||||
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
|
||||
<!--
|
||||
<Manager pathname="" />
|
||||
-->
|
||||
|
||||
<Resource name="java:/webbpm/AppDS" auth="Container"
|
||||
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
|
||||
url="jdbc:postgresql://10.10.31.119:5432/ervu-lkrp-ul"
|
||||
username="ervu-lkrp-ul" password="ervu-lkrp-ul" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
|
||||
</Context>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
IFS=','
|
||||
for databases in $WILDFLY_DATABASES
|
||||
do
|
||||
IFS=':' read name user password <<< $databases
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER $user WITH PASSWORD '$password';
|
||||
CREATE DATABASE $name WITH OWNER $user;
|
||||
EOSQL
|
||||
done
|
||||
24
config/dashboard.txt
Normal file
24
config/dashboard.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
docker-compose -p %image_tag% build --build-arg env="%reverse.dep.*.build_mode%"
|
||||
docker-compose -p %image_tag% up -d
|
||||
container_id=$(docker-compose -p %image_tag% ps -q webbpm-app)
|
||||
addr=%teamcity.agent.hostname%
|
||||
port_web=$(docker-compose -p %image_tag% port webbpm-app 8080 | cut -d: -f2)
|
||||
port_mgmt=$(docker-compose -p %image_tag% port webbpm-app 9990| cut -d: -f2)
|
||||
port_debug=$(docker-compose -p %image_tag% port webbpm-app 8787| cut -d: -f2)
|
||||
|
||||
|
||||
echo "Started container $container_id"
|
||||
|
||||
echo "Management URL: http://$addr:$port_mgmt/"
|
||||
echo "Webapp URL: http://$addr:$port_web/%APP_PATH%"
|
||||
echo "Debug URL: $addr:$port_debug"
|
||||
|
||||
echo "##teamcity[setParameter name='container_id' value='$container_id']"
|
||||
echo "##teamcity[setParameter name='webapp_url' value='http://$addr:$port_web/%APP_PATH%']"
|
||||
|
||||
echo "Waiting until the app is deployed..."
|
||||
# Wait until the app is deployed
|
||||
timeout 600 bash -c "until curl -s -o /dev/null --fail http://${addr}:${port_web}/%APP_PATH%/ ; do sleep 1; done"
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
version: "3"
|
||||
services:
|
||||
secdb:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.secdb
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
- testing.env
|
||||
labels:
|
||||
- "tmp=true"
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
version: "3"
|
||||
services:
|
||||
selenoid:
|
||||
network_mode: bridge
|
||||
image: aerokube/selenoid:latest-release
|
||||
container_name: "selenoid"
|
||||
environment:
|
||||
- OVERRIDE_VIDEO_OUTPUT_DIR=$PWD/video
|
||||
volumes:
|
||||
- ".:/etc/selenoid/:ro"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
- "./logs:/opt/selenoid/logs/"
|
||||
- "./video/:/opt/selenoid/video/"
|
||||
command: -session-attempt-timeout 1m -retry-count 3 -limit ${LIMIT:-4} -save-all-logs -log-output-dir /opt/selenoid/logs -video-output-dir /opt/selenoid/video
|
||||
ports:
|
||||
- "4444:4444"
|
||||
|
||||
selenoid-ui:
|
||||
image: aerokube/selenoid-ui
|
||||
container_name: "selenoid-ui"
|
||||
network_mode: bridge
|
||||
depends_on:
|
||||
- selenoid
|
||||
links:
|
||||
- "selenoid:selenoid"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
command: --selenoid-uri http://selenoid:4444`
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
version: "3"
|
||||
services:
|
||||
db:
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
- WILDFLY_DATABASES=app:app_user:apppassword,security:security_user:secpassword,jbpm:jbpm:jbpmpassword
|
||||
|
||||
webbpm-app:
|
||||
env_file:
|
||||
- testing.env
|
||||
|
||||
selenoid:
|
||||
network_mode: bridge
|
||||
image: aerokube/selenoid:latest-release
|
||||
container_name: "selenoid"
|
||||
environment:
|
||||
- OVERRIDE_VIDEO_OUTPUT_DIR=$PWD/video
|
||||
volumes:
|
||||
- "$PWD:/etc/selenoid/:ro"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
- "$PWD/logs:/opt/selenoid/logs/"
|
||||
- "$PWD/video/:/opt/selenoid/video/"
|
||||
command: -session-attempt-timeout 1m -retry-count 3 -limit ${LIMIT:-4} -save-all-logs -log-output-dir /opt/selenoid/logs -video-output-dir /opt/selenoid/video
|
||||
ports:
|
||||
- "4444:4444"
|
||||
depends_on:
|
||||
- webbpm-app
|
||||
|
||||
selenoid-ui:
|
||||
image: aerokube/selenoid-ui
|
||||
container_name: "selenoid-ui"
|
||||
network_mode: bridge
|
||||
depends_on:
|
||||
- selenoid
|
||||
links:
|
||||
- "selenoid:selenoid"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
command: --selenoid-uri http://selenoid:4444
|
||||
|
||||
|
|
@ -1,31 +1,10 @@
|
|||
version: "3"
|
||||
services:
|
||||
db:
|
||||
image: postgres:15
|
||||
volumes:
|
||||
- ./create-databases.sh:/docker-entrypoint-initdb.d/create-databases.sh
|
||||
command:
|
||||
- "--max_prepared_transactions=100"
|
||||
ports:
|
||||
- 5432
|
||||
environment:
|
||||
- WILDFLY_DATABASES=security:security_user:secpassword,jbpm:jbpm:jbpmpassword
|
||||
- POSTGRES_PASSWORD=supersecretpassword
|
||||
labels:
|
||||
- "tmp=true"
|
||||
|
||||
webbpm-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
depends_on:
|
||||
- db
|
||||
dockerfile: Dockerfile.TC
|
||||
ports:
|
||||
- 9990
|
||||
- 8080
|
||||
- 8787
|
||||
- 12345
|
||||
env_file:
|
||||
- testing.env
|
||||
labels:
|
||||
- "tmp=true"
|
||||
- micord.env
|
||||
|
|
|
|||
|
|
@ -1,48 +1,6 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
function wait_for_server() {
|
||||
until `$JBOSS_HOME/bin/jboss-cli.sh -c ":read-attribute(name=server-state)" 2> /dev/null | grep -q running`; do
|
||||
echo "Retry ..."
|
||||
done
|
||||
}
|
||||
. /etc/tomcat/tomcat.conf
|
||||
. /etc/sysconfig/tomcat
|
||||
|
||||
echo "dump environment variables to env.properties file"
|
||||
printenv > env.properties
|
||||
|
||||
echo "starting JBoss"
|
||||
nohup $JBOSS_HOME/bin/standalone.sh --admin-only 1>&2 2>/dev/null &
|
||||
|
||||
# running system patches
|
||||
wait_for_server
|
||||
$JBOSS_HOME/bin/jboss-cli.sh --connect --file="./patches/system/init.cli" --properties=env.properties
|
||||
$JBOSS_HOME/bin/jboss-cli.sh --connect --file="./patches/system/add-postgresql-driver.cli" --properties=env.properties
|
||||
bash "./patches/system/add-demo-user.sh"
|
||||
|
||||
# running project patches
|
||||
find ./patches/ -type f -name '*.cli' -not -path './patches/system/*' -print0 |
|
||||
while IFS= read -r -d '' f; do
|
||||
wait_for_server
|
||||
echo "running $f"
|
||||
$JBOSS_HOME/bin/jboss-cli.sh --connect --file="$f" --properties=env.properties
|
||||
done;
|
||||
|
||||
find ./patches/ -type f -name '*.sh' -not -path './patches/system/*' -print0 |
|
||||
while IFS= read -r -d '' f; do
|
||||
wait_for_server
|
||||
echo "running $f"
|
||||
bash "$f"
|
||||
done
|
||||
|
||||
echo "stopping JBoss"
|
||||
wait_for_server
|
||||
$JBOSS_HOME/bin/jboss-cli.sh --connect --command=:shutdown
|
||||
|
||||
if ! [[ -z $SERVER_START ]]; then
|
||||
echo "starting JBoss in standalone"
|
||||
sleep 10 # without this occurs error "address already in use"
|
||||
/opt/jboss/wildfly/bin/standalone.sh -c standalone.xml -b 0.0.0.0 -bmanagement 0.0.0.0
|
||||
else
|
||||
echo "cleaning up JBoss logs"
|
||||
rm -rf $JBOSS_HOME/standalone/log
|
||||
fi
|
||||
/usr/libexec/tomcat/server start
|
||||
|
|
|
|||
24
config/fl.txt
Normal file
24
config/fl.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
docker-compose -p %image_tag% build --build-arg env="%reverse.dep.*.build_mode%"
|
||||
docker-compose -p %image_tag% up -d
|
||||
container_id=$(docker-compose -p %image_tag% ps -q webbpm-app)
|
||||
addr=%teamcity.agent.hostname%
|
||||
port_web=$(docker-compose -p %image_tag% port webbpm-app 8080 | cut -d: -f2)
|
||||
port_mgmt=$(docker-compose -p %image_tag% port webbpm-app 9990| cut -d: -f2)
|
||||
port_debug=$(docker-compose -p %image_tag% port webbpm-app 8787| cut -d: -f2)
|
||||
|
||||
|
||||
echo "Started container $container_id"
|
||||
|
||||
echo "Management URL: http://$addr:$port_mgmt/"
|
||||
echo "Webapp URL: http://$addr:$port_web/%APP_PATH%"
|
||||
echo "Debug URL: $addr:$port_debug"
|
||||
|
||||
echo "##teamcity[setParameter name='container_id' value='$container_id']"
|
||||
echo "##teamcity[setParameter name='webapp_url' value='http://$addr:$port_web/%APP_PATH%']"
|
||||
|
||||
echo "Waiting until the app is deployed..."
|
||||
# Wait until the app is deployed
|
||||
timeout 600 bash -c "until curl -s -o /dev/null --fail http://${addr}:${port_web}/%APP_PATH%/ ; do sleep 1; done"
|
||||
7
config/micord.env
Normal file
7
config/micord.env
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
TZ=Europe/Moscow
|
||||
# App datasource
|
||||
DB_APP_USERNAME=ervu-lkrp-ul
|
||||
DB_APP_PASSWORD=ervu-lkrp-ul
|
||||
DB_APP_HOST=10.10.31.119
|
||||
DB_APP_PORT=5432
|
||||
DB_APP_NAME=ervu-lkrp-ul
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/subsystem=logging/logger=org.jooq.tools:add()
|
||||
/subsystem=logging/logger=org.jooq.tools:write-attribute(name=level, value=DEBUG)
|
||||
/subsystem=logging/logger=org.jooq.tools:add-handler(name=CONSOLE)
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
xa-data-source add \
|
||||
--name=AppDS \
|
||||
--enabled=true \
|
||||
--driver-name=postgresql \
|
||||
--jndi-name=java:/webbpm/AppDS \
|
||||
--user-name=${env.DB_APP_USERNAME:app_user} \
|
||||
--password=${env.DB_APP_PASSWORD:apppassword} \
|
||||
--use-ccm=true \
|
||||
--valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker \
|
||||
--validate-on-match=false \
|
||||
--background-validation=true \
|
||||
--background-validation-millis=5000 \
|
||||
--exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter \
|
||||
--statistics-enabled=true \
|
||||
--max-pool-size=50 \
|
||||
--query-timeout=300 \
|
||||
--xa-datasource-properties=ServerName=${env.DB_APP_HOST:db},PortNumber=${env.DB_APP_PORT:5432},DatabaseName=${env.DB_APP_NAME:app}
|
||||
|
||||
/system-property=ldap.mapping.login.param:add(value=${env.WEBBPM_LDAP_LOGIN_ATTR:uid})
|
||||
/system-property=ldap.mapping.org.code.param:add(value=${env.WEBBPM_LDAP_ORGANIZATION_ATTR:ou})
|
||||
/system-property=jboss.as.management.blocking.timeout:add(value=900)
|
||||
/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=record-request-start-time,value=true)
|
||||
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add(pattern=%h %t "%r" %s %b %D)
|
||||
/system-property=webbpm.cache.hazelcast.hosts:add(value="127.0.0.1")
|
||||
/system-property=webbpm.cache.hazelcast.outbound_port_definitions:add(value="5801-5820")
|
||||
/system-property=webbpm.security.session.active.count:add(value="20")
|
||||
/system-property=gar.enable:add(value=false)
|
||||
/system-property=security.password.regex:add(value="^((?=(.*\\d){1,})(?=.*[a-zа-яё])(?=.*[A-ZА-ЯЁ]).{8,})$")
|
||||
/system-property=fias.enable:add(value=false)
|
||||
/system-property=bpmn.enable:add(value=false)
|
||||
/system-property=file.webdav.upload.url:add(value="https://ervu-webdav.k8s.micord.ru")
|
||||
/system-property=file.webdav.upload.username:add(value="test")
|
||||
/system-property=file.webdav.upload.password:add(value="test")
|
||||
/system-property=av-kafka.send.message.topic.name:add(value="ervu.lkrp.download.request")
|
||||
/system-property=av-kafka.send.url:add(value="http://10.10.31.11:32609")
|
||||
/system-property=av-kafka.send.security.protocol:add(value="SASL_PLAINTEXT")
|
||||
/system-property=av-kafka.sasl.mechanism:add(value="SCRAM-SHA-256")
|
||||
/system-property=av-kafka.send.username:add(value="user1")
|
||||
/system-property=av-kafka.send.password:add(value="Blfi9d2OFG")
|
||||
/system-property=ervu.fileupload.max_file_size:add(value="5242880")
|
||||
/system-property=ervu.fileupload.max_request_size:add(value="6291456")
|
||||
/system-property=ervu.fileupload.file_size_threshold:add(value="0")
|
||||
/system-property=esia-scopes:add(value="fullname, snils, id_doc, birthdate, usr_org, openid")
|
||||
/system-property=esia-org-scopes:add(value="org_fullname, org_shortname, org_brhs, org_brhs_ctts, org_brhs_addrs, org_type, org_ogrn, org_inn, org_leg, org_kpp, org_ctts, org_addrs, org_grps, org_emps")
|
||||
/system-property=esia-org-scope-url:add(value="http://esia.gosuslugi.ru/")
|
||||
/system-property=esia-uri.base-uri:add(value="https://esia-portal1.test.gosuslugi.ru/")
|
||||
/system-property=esia-client-id:add(value="MNSV89")
|
||||
/system-property=esia-redirect-url:add(value="https://lkrp-dev.micord.ru/ul/")
|
||||
/system-property=sign-url:add(value="https://ervu-sign-dev.k8s.micord.ru/sign")
|
||||
/system-property=client-cert-hash:add(value="04508B4B0B58776A954A0E15F574B4E58799D74C61EE020B3330716C203E3BDD")
|
||||
/system-property=ervu-kafka.bootstrap-servers:add(value="localhost:9092")
|
||||
/system-property=ervu-kafka.org-reply-topic:add(value="ervu.organization.response")
|
||||
/system-property=ervu-kafka.group-id:add(value="1")
|
||||
/system-property=ervu-kafka.org-request-topic:add(value="ervu.organization.request")
|
||||
/system-property=ervu-kafka.reply-timeout:add(value="30")
|
||||
/system-property=esnsi.okopf.cron.load:add(value="0 0 */1 * * *")
|
||||
/system-property=esnsi.okopf.url:add(value="https://esnsi.gosuslugi.ru/rest/ext/v1/classifiers/11465/file?extension=JSON&encoding=UTF_8")
|
||||
/system-property=ervu-kafka.send.security.protocol:add(value="SASL_PLAINTEXT")
|
||||
/system-property=ervu-kafka.sasl.mechanism:add(value="SCRAM-SHA-256")
|
||||
/system-property=ervu-kafka.send.username:add(value="user1")
|
||||
/system-property=ervu-kafka.send.password:add(value="Blfi9d2OFG")
|
||||
/system-property=ervu-kafka.journal-request-topic:add(value="ervu.organization.journal.request")
|
||||
/system-property=ervu-kafka.journal-reply-topic:add(value="ervu.organization.journal.response")
|
||||
|
|
@ -1 +0,0 @@
|
|||
$JBOSS_HOME/bin/add-user.sh demo@example.com demo
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
/subsystem=datasources/jdbc-driver=postgresql:add( \
|
||||
driver-name="postgresql", \
|
||||
driver-module-name="org.postgresql", \
|
||||
driver-xa-datasource-class-name="org.postgresql.xa.PGXADataSource" \
|
||||
)
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/system-property=webbpm.mode:add(value=production)
|
||||
/system-property=authentication.method:add(value=form)
|
||||
/subsystem=undertow/configuration=filter/gzip=gzipFilter:add()
|
||||
/subsystem=undertow/server=default-server/host=default-host/\
|
||||
filter-ref=gzipFilter:add(predicate="exists('%{o,Content-Type}') and regex(pattern='(?:application/javascript|text/css|text/html|text/xml|application/json)(;.*)?', value=%{o,Content-Type}, full-match=true)")
|
||||
/subsystem=undertow/configuration=filter/response-header=vary-header:add(header-name="Vary", header-value="Accept-Encoding")
|
||||
/subsystem=undertow/server=default-server/host=default-host/filter-ref=vary-header:add()
|
||||
/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=max-post-size,value=${env.MAX_POST_SIZE:104857600})
|
||||
data-source remove --name=ExampleDS
|
||||
/subsystem=ee/service=default-bindings:remove
|
||||
/system-property=jboss.bind.address.management:add(value=0.0.0.0)
|
||||
/system-property=jboss.bind.address:add(value=0.0.0.0)
|
||||
module add --name=org.postgresql --resources=./patches/system/postgresql-driver.jar --dependencies=javax.api,javax.transaction.api
|
||||
shutdown --restart
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
INSERT INTO security.user_group(user_group_id, name, created, updated, access_level_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), 'Example', '2019-07-04 11:12:01.263+03', '2019-08-26 16:40:11.953+03', (SELECT access_level_id FROM security.access_level where level = 0)) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_group_user_role(link_user_group_user_role_id, user_group_id, user_role_id) SELECT uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_group_id FROM security.user_group where name = 'Example'), user_role_id FROM security.user_role WHERE name = 'Example' ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_group_user_role(link_user_group_user_role_id, user_group_id, user_role_id) SELECT uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_group_id FROM security.user_group where name = 'Demo'), user_role_id FROM security.user_role WHERE name = 'Example' ON CONFLICT DO NOTHING;
|
||||
|
||||
INSERT INTO security.user_group(user_group_id, name, created, updated, access_level_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), 'Example', '2019-07-04 11:12:01.263+03', '2019-08-26 16:40:11.953+03', (SELECT access_level_id FROM security.access_level where level = 0)) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_group_user_role(link_user_group_user_role_id, user_group_id, user_role_id) SELECT uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_group_id FROM security.user_group where name = 'Example'), user_role_id FROM security.user_role WHERE name = 'Example' ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_group_user_role(link_user_group_user_role_id, user_group_id, user_role_id) SELECT uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_group_id FROM security.user_group where name = 'Demo'), user_role_id FROM security.user_role WHERE name = 'Example' ON CONFLICT DO NOTHING;
|
||||
|
||||
INSERT INTO security.user_account(user_account_id, email, first_name, last_name, middle_name, created, updated, locked, org_unit_id, username) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), 'qa_test@micord.ru', 'Пользователь', 'Основной-Тестовый', NULL, '2020-01-20 08:41:25.526+03', '2020-01-20 09:57:07.25+03', false, (SELECT id from security.org_unit where code = 'DEFAULT'), 'qa_test') ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.simple_credentials( user_account_id, password, password_expires, password_updated) VALUES ((SELECT user_account_id from security.user_account where username = 'qa_test'), '$2a$11$uTzaeewDp2NehwjmfRe/euxP.cy.4ecl5nYA.E5TV9AGjjDKdJwI2', NULL, '2020-01-20 05:41:25.746') ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_test'), (SELECT user_group_id FROM security.user_group where name = 'Security Admin')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_test'), (SELECT user_group_id FROM security.user_group where name = 'BPMN Superuser')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_test'), (SELECT user_group_id FROM security.user_group where name = 'BPMN Admin')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_test'), (SELECT user_group_id FROM security.user_group where name = 'Example')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_test'), (SELECT user_group_id FROM security.user_group where name = 'BPMN User')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_test'), (SELECT user_group_id FROM security.user_group where name = 'Demo')) ON CONFLICT DO NOTHING;
|
||||
|
||||
INSERT INTO security.user_account(user_account_id, email, first_name, last_name, middle_name, created, updated, locked, org_unit_id, username) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), 'qa_admin@micord.ru', 'qa_admin', 'qa_admin', NULL, '2020-01-20 08:41:25.526+03', '2020-01-20 09:57:07.25+03', false, (SELECT id from security.org_unit where code = 'DEFAULT'), 'qa_admin') ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.simple_credentials( user_account_id, password, password_expires, password_updated) VALUES ((SELECT user_account_id from security.user_account where username = 'qa_admin'), '$2a$11$Zzmuga/xw1c1UnUe9nP9c.aqJ2O.OAI/AbmphOm2jurxMI0S6VAcy', NULL, '2020-01-20 05:41:25.746') ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_admin'), (SELECT user_group_id FROM security.user_group where name = 'Security Admin')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_admin'), (SELECT user_group_id FROM security.user_group where name = 'BPMN Superuser')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_admin'), (SELECT user_group_id FROM security.user_group where name = 'BPMN Admin')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_admin'), (SELECT user_group_id FROM security.user_group where name = 'Example')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_admin'), (SELECT user_group_id FROM security.user_group where name = 'BPMN User')) ON CONFLICT DO NOTHING;
|
||||
INSERT INTO security.link_user_account_user_group(link_user_account_user_group_id, user_account_id, user_group_id) VALUES (uuid_in(md5(random()::text || now()::text)::cstring), (SELECT user_account_id from security.user_account where username = 'qa_admin'), (SELECT user_group_id FROM security.user_group where name = 'Demo')) ON CONFLICT DO NOTHING;
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# Security datasource
|
||||
DB_SEC_USERNAME=ervu-lkrp-ul-sec
|
||||
DB_SEC_PASSWORD=ervu-lkrp-ul-sec
|
||||
DB_SEC_HOST=10.10.31.119
|
||||
DB_SEC_PORT=5432
|
||||
DB_SEC_NAME=ervu-lkrp-ul
|
||||
# App datasource
|
||||
DB_APP_USERNAME=ervu-lkrp-ul
|
||||
DB_APP_PASSWORD=ervu-lkrp-ul
|
||||
DB_APP_HOST=10.10.31.119
|
||||
DB_APP_PORT=5432
|
||||
DB_APP_NAME=ervu-lkrp-ul
|
||||
# jBPM datasorce
|
||||
DB_JBPM_USERNAME=jbpm-ervu-ul
|
||||
DB_JBPM_PASSWORD=jbpm-ervu-ul
|
||||
DB_JBPM_HOST=10.10.31.119
|
||||
DB_JBPM_PORT=5432
|
||||
DB_JBPM_NAME=jbpm-ervu-ul
|
||||
# Elasticsearch
|
||||
WEBBPM_ELASTIC_HOST=
|
||||
WEBBPM_ELASTIC_USER_PASSWORD=
|
||||
# LDAP
|
||||
WEBBPM_LDAP_URL=
|
||||
WEBBPM_LDAP_BASE=
|
||||
WEBBPM_LDAP_USER=
|
||||
WEBBPM_LDAP_PASSWORD=
|
||||
WEBBPM_LDAP_SYNC_ENABLED=false
|
||||
WEBBPM_LDAP_SYNC_CRON=0 0 * * * *
|
||||
WEBBPM_LDAP_LOGIN_ATTR=uid
|
||||
WEBBPM_LDAP_ORGANIZATION_ATTR=ou
|
||||
# JIRA
|
||||
WEBBPM_JIRA_URL=https:/jira.com
|
||||
WEBBPM_JIRA_USER=jiraUser
|
||||
WEBBPM_JIRA_PASSWORD=jiraPass
|
||||
TZ=Europe/Moscow
|
||||
WEBBPM_TELEGRAM_BOT_TOKEN=
|
||||
WEBBPM_TELEGRAM_BOT_NAME=
|
||||
5
config/tomcat/tomee/bin/setenv.sh → config/tomcat/etc/tomcat/conf.d/db.conf
Executable file → Normal file
5
config/tomcat/tomee/bin/setenv.sh → config/tomcat/etc/tomcat/conf.d/db.conf
Executable file → Normal file
|
|
@ -1,9 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export JAVA_OPTS="$JAVA_OPTS \
|
||||
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS \
|
||||
-Ddb.app.host=${DB_APP_HOST:-db} \
|
||||
-Ddb.app.port=${DB_APP_PORT:-5432} \
|
||||
-Ddb.app.name=${DB_APP_NAME:-app} \
|
||||
-Ddb.app.username=${DB_APP_USERNAME:-app_user} \
|
||||
-Ddb.app.password=${DB_APP_PASSWORD:-apppassword} \
|
||||
"
|
||||
export JDK_JAVA_OPTIONS
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
<Manager pathname="" />
|
||||
-->
|
||||
|
||||
<Resource name="java:/webbpm/AppDS" auth="Container"
|
||||
<Resource name="webbpm/AppDS" auth="Container"
|
||||
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
|
||||
url="jdbc:postgresql://${db.app.host}:${db.app.port}/${db.app.name}"
|
||||
username="${db.app.username}" password="${db.app.password}" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
|
||||
52
config/tomcat/etc/tomcat/tomcat.conf
Normal file
52
config/tomcat/etc/tomcat/tomcat.conf
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# System-wide configuration file for tomcat services
|
||||
# This will be loaded by systemd as an environment file,
|
||||
# so please keep the syntax. For shell expansion support
|
||||
# place your custom files as /etc/tomcat/conf.d/*.conf
|
||||
#
|
||||
# There are 2 "classes" of startup behavior in this package.
|
||||
# The old one, the default service named tomcat.service.
|
||||
# The new named instances are called tomcat@instance.service.
|
||||
#
|
||||
# Use this file to change default values for all services.
|
||||
# Change the service specific ones to affect only one service.
|
||||
# For tomcat.service it's /etc/sysconfig/tomcat, for
|
||||
# tomcat@instance it's /etc/sysconfig/tomcat@instance.
|
||||
|
||||
# This variable is used to figure out if config is loaded or not.
|
||||
TOMCAT_CFG_LOADED="1"
|
||||
|
||||
# In new-style instances, if CATALINA_BASE isn't specified, it will
|
||||
# be constructed by joining TOMCATS_BASE and NAME.
|
||||
TOMCATS_BASE="/var/lib/tomcats/"
|
||||
|
||||
# Where your java installation lives
|
||||
JAVA_HOME="/usr/lib/jvm/jre"
|
||||
|
||||
# Where your tomcat installation lives
|
||||
CATALINA_HOME="/usr/share/tomcat"
|
||||
|
||||
# System-wide tmp
|
||||
CATALINA_TMPDIR="/var/cache/tomcat/temp"
|
||||
|
||||
# You can pass some parameters to java here if you wish to
|
||||
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
|
||||
|
||||
# Use JAVA_OPTS to set java.library.path for libtcnative.so
|
||||
#JAVA_OPTS="-Djava.library.path=/usr/lib"
|
||||
|
||||
# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381
|
||||
#JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"
|
||||
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
|
||||
|
||||
# You can change your tomcat locale here
|
||||
#LANG="en_US"
|
||||
|
||||
# Run tomcat under the Java Security Manager
|
||||
SECURITY_MANAGER="false"
|
||||
|
||||
# SHUTDOWN_WAIT has been deprecated. To change the shutdown wait time, set
|
||||
# TimeoutStopSec in tomcat.service.
|
||||
|
||||
# If you wish to further customize your tomcat environment,
|
||||
# put your own definitions here
|
||||
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
# WebBPM properties
|
||||
#
|
||||
|
||||
authentication.method=form
|
||||
|
||||
|
|
@ -6,6 +7,8 @@ bpmn.enable=false
|
|||
fias.enable=false
|
||||
gar.enable=false
|
||||
|
||||
mail.jndi.resource.name=
|
||||
|
||||
reset_password.mail.template.path=mail/reset_password.html
|
||||
security.password.regex=^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9]+$
|
||||
|
||||
|
|
@ -41,6 +44,8 @@ ervu-kafka.org-reply-topic=ervu.organization.response
|
|||
ervu-kafka.group-id=1
|
||||
ervu-kafka.org-request-topic=ervu.organization.request
|
||||
ervu-kafka.reply-timeout=30
|
||||
ervu-kafka.journal-request-topic=ervu.organization.journal.request
|
||||
ervu-kafka.journal-reply-topic=ervu.organization.journal.response
|
||||
esnsi.okopf.url=https://esnsi.gosuslugi.ru/rest/ext/v1/classifiers/11465/file?extension=JSON&encoding=UTF_8
|
||||
esnsi.okopf.cron.load=0 0 */1 * * *
|
||||
ervu-kafka.send.security.protocol=SASL_PLAINTEXT
|
||||
|
|
@ -1 +1 @@
|
|||
1.0.0-SNAPSHOT
|
||||
%project.version%
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export class OrgDataRoot extends Behavior{
|
|||
let orgScripts: OrgData[] = this.container.getScriptsInThisAndChildren(OrgData);
|
||||
let httpClient = this.injector.get(HttpClient);
|
||||
let cookieService = this.injector.get(CookieService);
|
||||
if (cookieService.get("is_auth")) {
|
||||
if (cookieService.get("webbpm.ervu-lkrp-ul")) {
|
||||
httpClient.get<OrgInfoModel>("esia/org")
|
||||
.toPromise()
|
||||
.then(orgInfoModel => {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export class LogOutComponent implements OnInit{
|
|||
}
|
||||
|
||||
public getIsAuth(): boolean {
|
||||
return this.cookieService.get("is_auth") != null;
|
||||
return this.cookieService.get("webbpm.ervu-lkrp-ul") != null;
|
||||
}
|
||||
|
||||
public getOrgUnitName(): string {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,6 @@ export abstract class AuthGuard implements CanActivate {
|
|||
};
|
||||
|
||||
public getIsAuth(): string {
|
||||
return this.cookieService.get('is_auth');
|
||||
return this.cookieService.get('webbpm.ervu-lkrp-ul');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
71
pom.xml
71
pom.xml
|
|
@ -101,6 +101,22 @@
|
|||
<groupId>ru.cg.webbpm.modules.security</groupId>
|
||||
<artifactId>security-adapter</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>ru.micord.fias</groupId>
|
||||
<artifactId>client</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>ru.micord.gar</groupId>
|
||||
<artifactId>gar-client</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>net.javacrumbs.shedlock</groupId>
|
||||
<artifactId>shedlock-spring</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>net.javacrumbs.shedlock</groupId>
|
||||
<artifactId>shedlock-provider-jdbc-template</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
@ -177,11 +193,6 @@
|
|||
<version>${webbpm-platform.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.cg.webbpm.modules.security</groupId>
|
||||
<artifactId>security-beans</artifactId>
|
||||
<version>${webbpm-platform.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.cg.webbpm.modules.security</groupId>
|
||||
<artifactId>security-api</artifactId>
|
||||
|
|
@ -275,21 +286,6 @@
|
|||
<version>${webbpm-platform.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.cg.webbpm.modules.security</groupId>
|
||||
<artifactId>security-esia</artifactId>
|
||||
<version>${webbpm-platform.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.cg.webbpm.modules.security</groupId>
|
||||
<artifactId>security-db-synchronization-api</artifactId>
|
||||
<version>${webbpm-platform.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.cg.webbpm.modules.security</groupId>
|
||||
<artifactId>security-db-synchronization-ldap-impl</artifactId>
|
||||
<version>${webbpm-platform.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.cg.webbpm</groupId>
|
||||
<artifactId>web-tests-core</artifactId>
|
||||
|
|
@ -305,16 +301,6 @@
|
|||
<artifactId>bcpkix-jdk15on</artifactId>
|
||||
<version>${org.bouncycastle.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security.kerberos</groupId>
|
||||
<artifactId>spring-security-kerberos-core</artifactId>
|
||||
<version>${spring-security-kerberos.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security.kerberos</groupId>
|
||||
<artifactId>spring-security-kerberos-web</artifactId>
|
||||
<version>${spring-security-kerberos.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.kafka</groupId>
|
||||
<artifactId>spring-kafka</artifactId>
|
||||
|
|
@ -356,6 +342,31 @@
|
|||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>1.7.28</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>2.0.13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j2-impl</artifactId>
|
||||
<version>2.23.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.23.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-jul</artifactId>
|
||||
<version>2.23.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-web</artifactId>
|
||||
<version>2.23.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-bom</artifactId>
|
||||
|
|
|
|||
|
|
@ -1772,35 +1772,52 @@
|
|||
<scripts id="f203f156-be32-4131-9c86-4d6bac6d5d56">
|
||||
<enabled>false</enabled>
|
||||
</scripts>
|
||||
<scripts id="ea9ee45b-1f9d-4342-88e8-61fe9e9a2b74">
|
||||
<classRef type="TS">
|
||||
<className>TextBuilder</className>
|
||||
<packageName>component.util</packageName>
|
||||
</classRef>
|
||||
<enabled>true</enabled>
|
||||
<expanded>true</expanded>
|
||||
<properties>
|
||||
<entry>
|
||||
<key>parts</key>
|
||||
<value>
|
||||
<item id="40116c32-3326-4065-a329-8e14b8f8c7c0" removed="false">
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>inputControl</key>
|
||||
<value>
|
||||
<simple>{"objectId":"2f05ef7d-9092-4180-a361-8fecb3dd7542","packageName":"component.field","className":"DateTimePicker","type":"TS"}</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>postfix</key>
|
||||
<value>
|
||||
<simple>"."</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>prefix</key>
|
||||
<value>
|
||||
<simple>"Данные получены с портала Госуслуг "</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</item>
|
||||
</value>
|
||||
</entry>
|
||||
</properties>
|
||||
</scripts>
|
||||
</children>
|
||||
<children id="ff8c83c6-747c-476b-af82-dba5b3614c72">
|
||||
<prototypeId>ba24d307-0b91-4299-ba82-9d0b52384ff2</prototypeId>
|
||||
<componentRootId>ff8c83c6-747c-476b-af82-dba5b3614c72</componentRootId>
|
||||
<name>Текст</name>
|
||||
<container>false</container>
|
||||
<childrenReordered>false</childrenReordered>
|
||||
<scripts id="cf4526a1-96ab-4820-8aa9-62fb54c2b64c">
|
||||
<properties>
|
||||
<entry>
|
||||
<key>cssClasses</key>
|
||||
<value>
|
||||
<item id="dd4a3cc5-73be-4268-b6a9-500f86f44a66" removed="true"/>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>initialValue</key>
|
||||
<value>
|
||||
<simple>null</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</properties>
|
||||
</scripts>
|
||||
<scripts id="737b67e2-295f-4356-a1e1-9419344d8c85"/>
|
||||
<scripts id="a6ccccd9-354c-4725-9d34-c716cf626048"/>
|
||||
<scripts id="d38c1af5-2bfe-41cd-ab0f-67040f498127"/>
|
||||
<scripts id="f203f156-be32-4131-9c86-4d6bac6d5d56">
|
||||
<enabled>false</enabled>
|
||||
</scripts>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
</children>
|
||||
<children id="b6f5ecec-228d-4b9b-981b-646ce1c8afb2">
|
||||
|
|
@ -1810,27 +1827,6 @@
|
|||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="378704bd-f3b1-4bc1-adde-ac3f76ced307">
|
||||
<prototypeId>d7d54cfb-26b5-4dba-b56f-b6247183c24d</prototypeId>
|
||||
<componentRootId>378704bd-f3b1-4bc1-adde-ac3f76ced307</componentRootId>
|
||||
<name>Горизонтальный контейнер</name>
|
||||
<container>true</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="ac041964-e213-4c78-bf82-0c222008ec17">
|
||||
<prototypeId>ba24d307-0b91-4299-ba82-9d0b52384ff2</prototypeId>
|
||||
<componentRootId>ac041964-e213-4c78-bf82-0c222008ec17</componentRootId>
|
||||
<name>Текст</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="ff8c83c6-747c-476b-af82-dba5b3614c72">
|
||||
<prototypeId>ba24d307-0b91-4299-ba82-9d0b52384ff2</prototypeId>
|
||||
<componentRootId>ff8c83c6-747c-476b-af82-dba5b3614c72</componentRootId>
|
||||
<name>Текст</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="75cef41c-838c-464b-82de-9f6038cd4faa">
|
||||
<prototypeId>ba24d307-0b91-4299-ba82-9d0b52384ff2</prototypeId>
|
||||
<componentRootId>75cef41c-838c-464b-82de-9f6038cd4faa</componentRootId>
|
||||
|
|
@ -1883,6 +1879,13 @@
|
|||
<enabled>false</enabled>
|
||||
</scripts>
|
||||
</children>
|
||||
<children id="ff8c83c6-747c-476b-af82-dba5b3614c72">
|
||||
<prototypeId>ba24d307-0b91-4299-ba82-9d0b52384ff2</prototypeId>
|
||||
<componentRootId>ff8c83c6-747c-476b-af82-dba5b3614c72</componentRootId>
|
||||
<name>Текст</name>
|
||||
<container>false</container>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="7bc32d29-352c-4826-abbd-e2b5d381f3db">
|
||||
<prototypeId>98594cec-0a9b-4cef-af09-e1b71cb2ad9e</prototypeId>
|
||||
<componentRootId>7bc32d29-352c-4826-abbd-e2b5d381f3db</componentRootId>
|
||||
|
|
@ -2021,227 +2024,7 @@
|
|||
<componentRootId>9e03784a-d1bd-498c-84a1-93b2b681fd2d</componentRootId>
|
||||
<name>AC_text_cur_date</name>
|
||||
<container>false</container>
|
||||
<childrenReordered>false</childrenReordered>
|
||||
<scripts id="37dff5c8-1599-4984-b107-c44a87b6da2e">
|
||||
<properties>
|
||||
<entry>
|
||||
<key>eventRefs</key>
|
||||
<value>
|
||||
<item id="792bf37e-e285-442d-b966-18352574efc0" removed="false">
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>behavior</key>
|
||||
<value>
|
||||
<simple>{"objectId":"ff8c83c6-747c-476b-af82-dba5b3614c72","packageName":"component","className":"Text","type":"TS"}</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>propertyName</key>
|
||||
<value>
|
||||
<simple>"valueChangeEvent"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</item>
|
||||
<item id="31966e15-ee0a-4e09-a222-34f74d4be1cc" removed="false">
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>behavior</key>
|
||||
<value>
|
||||
<simple>{"objectId":"2f05ef7d-9092-4180-a361-8fecb3dd7542","packageName":"component.field","className":"DateTimePicker","type":"TS"}</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>propertyName</key>
|
||||
<value>
|
||||
<simple>"valueChangeEvent"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</item>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>ifCondition</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>conditions</key>
|
||||
<value>
|
||||
<item id="71e44cda-881c-48a6-a6df-863daa5eee18" removed="false">
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>_isGroupSelected</key>
|
||||
<value>
|
||||
<simple>false</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>one</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>conditionFirstPart</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>objectValue</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>behavior</key>
|
||||
<value>
|
||||
<simple>{"objectId":"ff8c83c6-747c-476b-af82-dba5b3614c72","packageName":"component","className":"Text","type":"TS"}</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>method</key>
|
||||
<value>
|
||||
<simple>"getValue"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>operation</key>
|
||||
<value>
|
||||
<simple>"IS_EMPTY"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</item>
|
||||
<item id="8ee05833-a52f-4e16-b4c0-132258108200" removed="false">
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>_isGroupSelected</key>
|
||||
<value>
|
||||
<simple>false</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>one</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>conditionFirstPart</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>objectValue</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>behavior</key>
|
||||
<value>
|
||||
<simple>{"objectId":"2f05ef7d-9092-4180-a361-8fecb3dd7542","packageName":"component.field","className":"DateTimePicker","type":"TS"}</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>method</key>
|
||||
<value>
|
||||
<simple>"getDateValue"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>operation</key>
|
||||
<value>
|
||||
<simple>"IS_NOT_EMPTY"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</item>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>logicalOperation</key>
|
||||
<value>
|
||||
<simple>null</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>thenActions</key>
|
||||
<value>
|
||||
<item id="71ed08da-3713-43b5-bbf0-f0f5b5541b67" removed="false">
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>behavior</key>
|
||||
<value>
|
||||
<simple>{"objectId":"ff8c83c6-747c-476b-af82-dba5b3614c72","packageName":"component","className":"Text","type":"TS"}</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>method</key>
|
||||
<value>
|
||||
<simple>"setValue"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>value</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>objectValue</key>
|
||||
<value>
|
||||
<complex>
|
||||
<entry>
|
||||
<key>argument</key>
|
||||
<value>
|
||||
<simple>null</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>behavior</key>
|
||||
<value>
|
||||
<simple>{"objectId":"2f05ef7d-9092-4180-a361-8fecb3dd7542","packageName":"component.field","className":"DateTimePicker","type":"TS"}</simple>
|
||||
</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>method</key>
|
||||
<value>
|
||||
<simple>"getTextValue"</simple>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</entry>
|
||||
</complex>
|
||||
</value>
|
||||
</item>
|
||||
</value>
|
||||
</entry>
|
||||
</properties>
|
||||
</scripts>
|
||||
<removed>true</removed>
|
||||
</children>
|
||||
<children id="4c5662ea-a411-4bdd-8f11-d3cbfbea6f98">
|
||||
<prototypeId>e32ae1f5-5b14-45f1-abb6-f52c34b3b570</prototypeId>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue