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