mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 11:53:48 +01:00
Compare commits
No commits in common. "01e0639c5502ca8d9594eb64fcf4c1da2df023fd" and "f86f96a35e9723f8624961f273d0f8a32a694c03" have entirely different histories.
01e0639c55
...
f86f96a35e
@ -1,21 +0,0 @@
|
|||||||
version: '3'
|
|
||||||
services:
|
|
||||||
wise-api:
|
|
||||||
build:
|
|
||||||
context: ./wise-api
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
ports:
|
|
||||||
- "8080:8080"
|
|
||||||
# environment:
|
|
||||||
# SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/product
|
|
||||||
# SPRING_DATASOURCE_USERNAME: product_user
|
|
||||||
# SPRING_DATASOURCE_PASSWORD: product_user_password
|
|
||||||
|
|
||||||
react-app:
|
|
||||||
build:
|
|
||||||
context: ./wise-ui
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
depends_on:
|
|
||||||
- wise-api
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
@ -1,5 +0,0 @@
|
|||||||
FROM amazoncorretto:17.0.10
|
|
||||||
|
|
||||||
VOLUME /tmp
|
|
||||||
COPY target/wisemapping-api.jar app.jar
|
|
||||||
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app.jar ${0} ${@}"]
|
|
@ -1,9 +0,0 @@
|
|||||||
services:
|
|
||||||
database:
|
|
||||||
image: 'postgres:15.2'
|
|
||||||
ports:
|
|
||||||
- '5432'
|
|
||||||
environment:
|
|
||||||
- 'POSTGRES_USER=myuser'
|
|
||||||
- 'POSTGRES_DB=mydatabase'
|
|
||||||
- 'POSTGRES_PASSWORD=secret'
|
|
@ -1,16 +0,0 @@
|
|||||||
package com.wisemapping.config.common;
|
|
||||||
|
|
||||||
import com.wisemapping.dao.MindmapManagerImpl;
|
|
||||||
import com.wisemapping.model.User;
|
|
||||||
import com.wisemapping.service.MindmapServiceImpl;
|
|
||||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@EnableJpaRepositories(basePackageClasses={MindmapServiceImpl.class, MindmapManagerImpl.class})
|
|
||||||
@EntityScan(basePackageClasses= User.class)
|
|
||||||
public class JPAConfig {
|
|
||||||
|
|
||||||
}
|
|
@ -1,79 +0,0 @@
|
|||||||
# SpringBoot Configuration ...
|
|
||||||
|
|
||||||
spring:
|
|
||||||
output:
|
|
||||||
ansi:
|
|
||||||
enabled=always:
|
|
||||||
application:
|
|
||||||
name: wisemapping-api
|
|
||||||
title: wisemapping-api
|
|
||||||
datasource:
|
|
||||||
driver-class-name: org.hsqldb.jdbc.JDBCDriver
|
|
||||||
password: ''
|
|
||||||
url: jdbc:hsqldb:file:${database.base.url}/db/wisemapping
|
|
||||||
username: sa
|
|
||||||
jpa:
|
|
||||||
hibernate:
|
|
||||||
ddl-auto: none
|
|
||||||
open-in-view: true
|
|
||||||
properties:
|
|
||||||
hibernate:
|
|
||||||
current_session_context_class: thread
|
|
||||||
default_batch_fetch_size: 200
|
|
||||||
dialect: org.hibernate.dialect.HSQLDialect
|
|
||||||
format_sql: true
|
|
||||||
main:
|
|
||||||
allow-circular-references: true
|
|
||||||
sql:
|
|
||||||
init:
|
|
||||||
mode: always
|
|
||||||
platform: hsqldb
|
|
||||||
|
|
||||||
# Application Configuration.
|
|
||||||
|
|
||||||
admin:
|
|
||||||
user: admin@wisemapping.org
|
|
||||||
database:
|
|
||||||
base:
|
|
||||||
url: /Users/veigap/
|
|
||||||
google:
|
|
||||||
ads:
|
|
||||||
enabled: false
|
|
||||||
analytics:
|
|
||||||
account: UA-XXXX
|
|
||||||
enabled: false
|
|
||||||
recaptcha2:
|
|
||||||
enabled: true
|
|
||||||
secretKey: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
|
|
||||||
siteKey: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
org:
|
|
||||||
apache:
|
|
||||||
tomcat: INFO
|
|
||||||
root: INFO
|
|
||||||
mail:
|
|
||||||
password: ''
|
|
||||||
serverSendEmail: root@localhost
|
|
||||||
smtp:
|
|
||||||
auth: false
|
|
||||||
host: localhost
|
|
||||||
port: 25
|
|
||||||
quitwait: false
|
|
||||||
starttls:
|
|
||||||
enable: false
|
|
||||||
supportEmail: root@localhost
|
|
||||||
username: root
|
|
||||||
security:
|
|
||||||
oauth2:
|
|
||||||
google:
|
|
||||||
confirmUrl: https://oauth2.googleapis.com/token
|
|
||||||
url: https//review
|
|
||||||
userinfoUrl: https://www.googleapis.com/oauth2/v3/userinfo
|
|
||||||
site:
|
|
||||||
homepage: c/login
|
|
||||||
static:
|
|
||||||
js:
|
|
||||||
url: /static
|
|
||||||
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
| | |' |\ /| ' /\ |~~\~|~
|
|
||||||
| | ||(~/~/| \/ |/~~||~~\|~~\||/~\ /~~| /__\ |__/ |
|
|
||||||
\/ \/ |_)\/_| |\__||__/|__/|| |\__| / \| _|_
|
|
||||||
| | \__|
|
|
||||||
${application.title} ${application.version}
|
|
||||||
Powered by Spring Boot ${spring-boot.version}
|
|
@ -1,26 +0,0 @@
|
|||||||
FROM node:18.12.1-buster-slim AS builder
|
|
||||||
|
|
||||||
# Set the working directory in the container
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ARG VERSION="5.1.2"
|
|
||||||
|
|
||||||
## Install dependencies
|
|
||||||
RUN mkdir webapp && npm pack @wisemapping/webapp@${VERSION} && tar -xvzf wisemapping-webapp-${VERSION}.tgz -C webapp
|
|
||||||
RUN mkdir mindplot && npm pack @wisemapping/mindplot@${VERSION} && tar -xvzf wisemapping-mindplot-${VERSION}.tgz -C mindplot
|
|
||||||
ADD index.html .
|
|
||||||
|
|
||||||
# Use Nginx as the production server
|
|
||||||
FROM nginx:stable-alpine
|
|
||||||
LABEL maintainer="Paulo Gustavo Veiga <pveiga@wisemapping.com>"
|
|
||||||
|
|
||||||
## Copy the built React app to Nginx's web server directory
|
|
||||||
COPY --from=builder /app /usr/share/nginx/html
|
|
||||||
COPY --from=builder /app/webapp/package/dist/* /usr/share/nginx/html/webapp/
|
|
||||||
COPY --from=builder /app/mindplot/package/dist/* /usr/share/nginx/html/mindplot/
|
|
||||||
|
|
||||||
# Expose port 80 for the Nginx server
|
|
||||||
EXPOSE 80
|
|
||||||
|
|
||||||
# Start Nginx when the container runs
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
|
@ -1,52 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<base href="/static/webapp/"/>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
|
|
||||||
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;600&display=swap"
|
|
||||||
as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin>
|
|
||||||
<script>
|
|
||||||
window.serverconfig = {
|
|
||||||
apiBaseUrl: '${requestScope['site.baseurl']}',
|
|
||||||
analyticsAccount: '${requestScope['google.analytics.account']}',
|
|
||||||
clientType: 'rest',
|
|
||||||
recaptcha2Enabled: ${requestScope['google.recaptcha2.enabled']},
|
|
||||||
recaptcha2SiteKey: '${requestScope['google.recaptcha2.siteKey']}',
|
|
||||||
googleOauth2Url: '${requestScope['security.oauth2.google.url']}'
|
|
||||||
};
|
|
||||||
|
|
||||||
<%-- Hack to force view selection on react to move all the UI to react --%>
|
|
||||||
window.errorMvcView = '${requestScope['exception']!=null?(fn:indexOf(requestScope['exception'],'SecurityException') gt 1?'securityError':'unexpectedError'):''}';
|
|
||||||
/*
|
|
||||||
${requestScope['exception']}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function downloadJsAtOnload() {
|
|
||||||
setTimeout(function downloadJs() {
|
|
||||||
var element = document.createElement("script");
|
|
||||||
element.setAttribute("data-ad-client", "ca-pub-4996113942657337");
|
|
||||||
element.async = true;
|
|
||||||
element.src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
|
|
||||||
document.body.appendChild(element);
|
|
||||||
}, 50);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.addEventListener("load", downloadJsAtOnload, false);
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
||||||
<div id="root"></div>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="/webapp/vendors.bundle.js" crossorigin="anonymous" async></script>
|
|
||||||
<script type="text/javascript" src="/webapp/app.bundle.js" crossorigin="anonymous" async></script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -58,6 +58,21 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
<configuration>
|
||||||
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
|
<webResources>
|
||||||
|
<resource>
|
||||||
|
<directory>target</directory>
|
||||||
|
<!-- this is relative to the pom.xml directory -->
|
||||||
|
<includes>wisemapping-*/**/dist/*</includes>
|
||||||
|
</resource>
|
||||||
|
</webResources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
1
wise-webapp/config
Symbolic link
1
wise-webapp/config
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../config/
|
@ -9,11 +9,11 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>wise-api</artifactId>
|
<artifactId>wise-webapp</artifactId>
|
||||||
<version>5.1.0-SNAPSHOT</version>
|
<version>5.1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>WiseMapping API</name>
|
<name>WiseMapping Webapp</name>
|
||||||
<url>https://www.wisemapping.org</url>
|
<url>http://www.wisemapping.org</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<com.wisemapping.version>5.1.0-SNAPSHOT</com.wisemapping.version>
|
<com.wisemapping.version>5.1.0-SNAPSHOT</com.wisemapping.version>
|
||||||
@ -131,6 +131,11 @@
|
|||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
<version>8.1.0</version>
|
<version>8.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-dbcp2</artifactId>
|
||||||
|
<version>2.9.0</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.angus</groupId>
|
<groupId>org.eclipse.angus</groupId>
|
||||||
<artifactId>jakarta.mail</artifactId>
|
<artifactId>jakarta.mail</artifactId>
|
||||||
@ -148,13 +153,6 @@
|
|||||||
<version>1.7</version>
|
<version>1.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Connection Pool-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.zaxxer</groupId>
|
|
||||||
<artifactId>HikariCP</artifactId>
|
|
||||||
<version>5.1.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Only for test purposes -->
|
<!-- Only for test purposes -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hsqldb</groupId>
|
<groupId>org.hsqldb</groupId>
|
||||||
@ -214,7 +212,6 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
@ -223,17 +220,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>repackage</id>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<finalName>wisemapping-api</finalName>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<!-- <configuration>-->
|
<!-- <configuration>-->
|
||||||
<!-- <jvmArguments>-->
|
<!-- <jvmArguments>-->
|
||||||
<!-- -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005-->
|
<!-- -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005-->
|
@ -10,7 +10,7 @@ import org.springframework.context.annotation.Import;
|
|||||||
import org.springframework.context.annotation.ImportResource;
|
import org.springframework.context.annotation.ImportResource;
|
||||||
|
|
||||||
@ComponentScan(basePackageClasses = {AuthenticationProvider.class, MindmapServiceImpl.class, LabelManagerImpl.class, VelocityEngineUtils.class})
|
@ComponentScan(basePackageClasses = {AuthenticationProvider.class, MindmapServiceImpl.class, LabelManagerImpl.class, VelocityEngineUtils.class})
|
||||||
@Import({JPAConfig.class, SecurityConfig.class})
|
@Import({HibernateConfig.class, SecurityConfig.class})
|
||||||
@EnableAutoConfiguration
|
@EnableAutoConfiguration
|
||||||
@ImportResource(value = {"classpath:spring/wisemapping-mail.xml"})
|
@ImportResource(value = {"classpath:spring/wisemapping-mail.xml"})
|
||||||
public class CommonConfig {
|
public class CommonConfig {
|
@ -0,0 +1,53 @@
|
|||||||
|
package com.wisemapping.config.common;
|
||||||
|
|
||||||
|
import com.wisemapping.dao.MindmapManagerImpl;
|
||||||
|
import com.wisemapping.model.User;
|
||||||
|
import com.wisemapping.service.MindmapServiceImpl;
|
||||||
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
|
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableJpaRepositories(basePackageClasses={MindmapServiceImpl.class, MindmapManagerImpl.class})
|
||||||
|
@EntityScan(basePackageClasses= User.class)
|
||||||
|
public class HibernateConfig {
|
||||||
|
|
||||||
|
// @Bean
|
||||||
|
// public HibernateTransactionManager hibernateTransactionManager() {
|
||||||
|
// final HibernateTransactionManager result = new HibernateTransactionManager();
|
||||||
|
// result.setNestedTransactionAllowed(true);
|
||||||
|
// // @Todo: Am I creatting two instances ???
|
||||||
|
// result.setSessionFactory(sessionFactory().getObject());
|
||||||
|
// return result;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private Properties hibernateProperties() {
|
||||||
|
// final Properties result = new Properties();
|
||||||
|
// result.setProperty("hibernate.dialect", dbDialect);
|
||||||
|
// result.setProperty("hibernate.default_batch_fetch_size", "200");
|
||||||
|
// result.setProperty("hibernate.nestedTransactionAllowed", "true");
|
||||||
|
// result.setProperty("hibernate.auto_quote_keyword", "true");
|
||||||
|
//
|
||||||
|
// return result;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Bean
|
||||||
|
// public DataSource dataSource() {
|
||||||
|
// final BasicDataSource result = new BasicDataSource();
|
||||||
|
// result.setDriverClassName(dbDriver);
|
||||||
|
// result.setUrl(dbUrl);
|
||||||
|
// result.setUsername(dbUsername);
|
||||||
|
// result.setPassword(dbPassword);
|
||||||
|
// result.setTestOnBorrow(dbSetOnBorrow);
|
||||||
|
//
|
||||||
|
// result.setDefaultQueryTimeout(15);
|
||||||
|
// result.setMaxTotal(100);
|
||||||
|
// result.setMaxIdle(30);
|
||||||
|
// result.setInitialSize(5);
|
||||||
|
// result.setMaxWaitMillis(10000);
|
||||||
|
// result.setValidationQuery(dbValQuery);
|
||||||
|
//
|
||||||
|
// return result;
|
||||||
|
// }
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user