@@ -78,8 +78,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def buildTime = sh(script: "TZ='Asia/Novosibirsk' date '+%d-%m-%Y %H:%M:%S'", returnStdout: true).trim()
|
def buildTime = sh(script: "TZ='Asia/Novosibirsk' date '+%d-%m-%Y %H:%M:%S'", returnStdout: true).trim()
|
||||||
def baseUrl = params.SPRING_PROFILE == 'prod' ? 'https://workspace.not-copy.com' :
|
def springProfile = params.SPRING_PROFILE
|
||||||
'https://dev-workspace.not-copy.com'
|
|
||||||
withCredentials([
|
withCredentials([
|
||||||
usernamePassword(
|
usernamePassword(
|
||||||
credentialsId: 'server-root-password',
|
credentialsId: 'server-root-password',
|
||||||
@@ -162,7 +161,7 @@ pipeline {
|
|||||||
-e POSTGRES_PORT=5432 \\
|
-e POSTGRES_PORT=5432 \\
|
||||||
-e POSTGRES_HOST=no_copy_${params.PORT} \\
|
-e POSTGRES_HOST=no_copy_${params.PORT} \\
|
||||||
-e FILE_STORAGE_PATH=/data/uploads \\
|
-e FILE_STORAGE_PATH=/data/uploads \\
|
||||||
-e BASE_URL=${baseUrl} \\
|
-e SPRING_PROFILES_ACTIVE=${springProfile} \\
|
||||||
app-backend-${params.PORT}:latest
|
app-backend-${params.PORT}:latest
|
||||||
|
|
||||||
echo '8. Проверка...'
|
echo '8. Проверка...'
|
||||||
|
|||||||
@@ -40,10 +40,7 @@ public class FileSimilarityService {
|
|||||||
|
|
||||||
private final FileEntityRepository fileEntityRepository;
|
private final FileEntityRepository fileEntityRepository;
|
||||||
|
|
||||||
// @Value("${server.baseurl}")
|
@Value("${server.baseurl}")
|
||||||
// private String baseUrl;
|
|
||||||
|
|
||||||
@Value("${BASE_URL}")
|
|
||||||
private String baseUrl;
|
private String baseUrl;
|
||||||
|
|
||||||
public List<SimilarFileDTO> findDuplicateByHammingDistance(String fileId, int hammingDistance,
|
public List<SimilarFileDTO> findDuplicateByHammingDistance(String fileId, int hammingDistance,
|
||||||
@@ -242,8 +239,7 @@ public class FileSimilarityService {
|
|||||||
.uploadDate(similarImageProjection.getUploadDate())
|
.uploadDate(similarImageProjection.getUploadDate())
|
||||||
.status(similarImageProjection.getProtectionStatus())
|
.status(similarImageProjection.getProtectionStatus())
|
||||||
// .url(baseUrl + "/api/files/protected/" + similarImageProjection.getId())
|
// .url(baseUrl + "/api/files/protected/" + similarImageProjection.getId())
|
||||||
.url("https://workspace.not-copy.com" + "/api/files/protected/" + similarImageProjection.getId() + "/thumbnail")
|
.url(baseUrl + "/api/files/protected/" + similarImageProjection.getId() + "/thumbnail")
|
||||||
// .url(baseUrl + "/api/files/protected/" + similarImageProjection.getId() + "/thumbnail")
|
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,10 +42,7 @@ public class EmailService {
|
|||||||
@Value("${app.email.verification.drop-password-subject}")
|
@Value("${app.email.verification.drop-password-subject}")
|
||||||
private String dropPasswordSubject;
|
private String dropPasswordSubject;
|
||||||
|
|
||||||
// @Value("${server.baseurl}")
|
@Value("${server.baseurl}")
|
||||||
// private String baseUrl;
|
|
||||||
|
|
||||||
@Value("${BASE_URL}")
|
|
||||||
private String baseUrl;
|
private String baseUrl;
|
||||||
|
|
||||||
@Value("${server.front.port}")
|
@Value("${server.front.port}")
|
||||||
@@ -73,8 +70,7 @@ public class EmailService {
|
|||||||
throws MessagingException, IOException {
|
throws MessagingException, IOException {
|
||||||
String htmlContent = loadAndProcessTemplate(Map.of("username", user.getFullName(),
|
String htmlContent = loadAndProcessTemplate(Map.of("username", user.getFullName(),
|
||||||
"current_tokens", String.valueOf(currentTokens), "missing_tokens",
|
"current_tokens", String.valueOf(currentTokens), "missing_tokens",
|
||||||
// String.valueOf(missingTokens), "link_to_token_board", baseUrl + "/pages/payment"),
|
String.valueOf(missingTokens), "link_to_token_board", baseUrl + "/pages/payment"),
|
||||||
String.valueOf(missingTokens), "link_to_token_board", "https://workspace.not-copy.com" + "/pages/payment"),
|
|
||||||
"templates/token-not-found.html");
|
"templates/token-not-found.html");
|
||||||
|
|
||||||
sendEmail("noreply@no-copy.ru", user.getEmail(), standartAdressFrom, htmlContent);
|
sendEmail("noreply@no-copy.ru", user.getEmail(), standartAdressFrom, htmlContent);
|
||||||
@@ -149,8 +145,7 @@ public class EmailService {
|
|||||||
String htmlContent = loadAndProcessTemplate(user.getFullName(), code,
|
String htmlContent = loadAndProcessTemplate(user.getFullName(), code,
|
||||||
"templates/reset-password.html");
|
"templates/reset-password.html");
|
||||||
//TODO frontPort убрать после настройки редиректа nginx
|
//TODO frontPort убрать после настройки редиректа nginx
|
||||||
// String resetLink = escapeHtml(baseUrl + "/reset-password?email=" + user.getEmail());
|
String resetLink = escapeHtml(baseUrl + "/reset-password?email=" + user.getEmail());
|
||||||
String resetLink = escapeHtml("https://workspace.not-copy.com" + "/reset-password?email=" + user.getEmail());
|
|
||||||
htmlContent = htmlContent.replace("{{resetLink}}", resetLink);
|
htmlContent = htmlContent.replace("{{resetLink}}", resetLink);
|
||||||
|
|
||||||
helper.setText(htmlContent, true);
|
helper.setText(htmlContent, true);
|
||||||
|
|||||||
@@ -86,10 +86,7 @@ public class SearchImageService {
|
|||||||
@Value("${searchapi.api-key:}")
|
@Value("${searchapi.api-key:}")
|
||||||
private String searchApiKey;
|
private String searchApiKey;
|
||||||
|
|
||||||
// @Value("${server.baseurl}")
|
@Value("${server.baseurl}")
|
||||||
// private String appBaseUrl;
|
|
||||||
|
|
||||||
@Value("${BASE_URL}")
|
|
||||||
private String appBaseUrl;
|
private String appBaseUrl;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
@@ -113,8 +110,7 @@ public class SearchImageService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// String publicUrl = String.format("%s/api/files/public/%s", appBaseUrl, fileEntity.getId());
|
String publicUrl = String.format("%s/api/files/public/%s", appBaseUrl, fileEntity.getId());
|
||||||
String publicUrl = String.format("%s/api/files/public/%s", "https://workspace.not-copy.com", fileEntity.getId());
|
|
||||||
|
|
||||||
log.info("Searching reverse for image: {}", publicUrl);
|
log.info("Searching reverse for image: {}", publicUrl);
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ security:
|
|||||||
|
|
||||||
server:
|
server:
|
||||||
port: ${SERVER_PORT:8080}
|
port: ${SERVER_PORT:8080}
|
||||||
baseurl: "https://dev-workspace.not-copy.com"
|
baseurl: ${BASE_URL:https://dev-workspace.not-copy.com}
|
||||||
front:
|
front:
|
||||||
port: ":2998"
|
port: ":2998"
|
||||||
tomcat:
|
tomcat:
|
||||||
@@ -145,3 +145,27 @@ tarif:
|
|||||||
enterprice-max-files-count: 50
|
enterprice-max-files-count: 50
|
||||||
enterprice-disk-size: 500
|
enterprice-disk-size: 500
|
||||||
enterprice-user-count: 80
|
enterprice-user-count: 80
|
||||||
|
|
||||||
|
---
|
||||||
|
spring:
|
||||||
|
config:
|
||||||
|
activate:
|
||||||
|
on-profile: dev
|
||||||
|
server:
|
||||||
|
baseurl: https://dev-workspace.not-copy.com
|
||||||
|
|
||||||
|
---
|
||||||
|
spring:
|
||||||
|
config:
|
||||||
|
activate:
|
||||||
|
on-profile: prod
|
||||||
|
server:
|
||||||
|
baseurl: https://workspace.not-copy.com
|
||||||
|
|
||||||
|
---
|
||||||
|
spring:
|
||||||
|
config:
|
||||||
|
activate:
|
||||||
|
on-profile: local
|
||||||
|
server:
|
||||||
|
baseurl: http://localhost:8080
|
||||||
Reference in New Issue
Block a user