Compare commits

..

5 Commits

Author SHA1 Message Date
Paulo Gustavo Veiga
01e0639c55 Fix compose. 2024-02-03 23:22:38 -08:00
Paulo Gustavo Veiga
71f77f6e79 Start docker compoose. 2024-02-03 23:10:32 -08:00
Paulo Gustavo Veiga
f046bcaebc Start working on docker compose. 2024-02-03 20:35:09 -08:00
Paulo Gustavo Veiga
c976046fca Convert to yaml. 2024-02-03 19:42:15 -08:00
Paulo Gustavo Veiga
7724d9106d Clean up jpa setting. 2024-02-03 19:37:10 -08:00
194 changed files with 237 additions and 228 deletions

21
docker-compose.yml Normal file
View File

@ -0,0 +1,21 @@
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"

5
wise-api/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM amazoncorretto:17.0.10
VOLUME /tmp
COPY target/wisemapping-api.jar app.jar
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app.jar ${0} ${@}"]

View File

@ -0,0 +1,9 @@
services:
database:
image: 'postgres:15.2'
ports:
- '5432'
environment:
- 'POSTGRES_USER=myuser'
- 'POSTGRES_DB=mydatabase'
- 'POSTGRES_PASSWORD=secret'

View File

@ -9,11 +9,11 @@
</parent>
<groupId>org.wisemapping</groupId>
<artifactId>wise-webapp</artifactId>
<artifactId>wise-api</artifactId>
<version>5.1.0-SNAPSHOT</version>
<name>WiseMapping Webapp</name>
<url>http://www.wisemapping.org</url>
<name>WiseMapping API</name>
<url>https://www.wisemapping.org</url>
<properties>
<com.wisemapping.version>5.1.0-SNAPSHOT</com.wisemapping.version>
@ -131,11 +131,6 @@
<artifactId>mysql-connector-j</artifactId>
<version>8.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>jakarta.mail</artifactId>
@ -153,6 +148,13 @@
<version>1.7</version>
</dependency>
<!-- Connection Pool-->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>5.1.0</version>
</dependency>
<!-- Only for test purposes -->
<dependency>
<groupId>org.hsqldb</groupId>
@ -212,6 +214,7 @@
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -220,6 +223,17 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<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>-->
<!-- <jvmArguments>-->
<!-- -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005-->

View File

@ -10,7 +10,7 @@ import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;
@ComponentScan(basePackageClasses = {AuthenticationProvider.class, MindmapServiceImpl.class, LabelManagerImpl.class, VelocityEngineUtils.class})
@Import({HibernateConfig.class, SecurityConfig.class})
@Import({JPAConfig.class, SecurityConfig.class})
@EnableAutoConfiguration
@ImportResource(value = {"classpath:spring/wisemapping-mail.xml"})
public class CommonConfig {

View File

@ -0,0 +1,16 @@
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 {
}

Some files were not shown because too many files have changed in this diff Show More