Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Phuc Nguyen committed Oct 10, 2018
2 parents 76c31e6 + 27acf83 commit 152ef15
Show file tree
Hide file tree
Showing 622 changed files with 9,071 additions and 10,712 deletions.
4 changes: 2 additions & 2 deletions README.md
@@ -1,6 +1,6 @@
# Free, open source CRM, Document and Project Management software
[![License](http://img.shields.io/badge/License-AGPLv3-orange.svg)](https://www.gnu.org/licenses/agpl-3.0.en.html) [![Project Stats](https://www.openhub.net/p/mycollab/widgets/project_thin_badge.gif)](https://www.openhub.net/p/mycollab) [![Build](https://travis-ci.org/MyCollab/mycollab.svg)](https://travis-ci.org/MyCollab/mycollab)
[![Version](https://img.shields.io/badge/Version-5.4.10-brightgreen.svg)](https://community.mycollab.com/)
[![Version](https://img.shields.io/badge/Version-6.0.0-brightgreen.svg)](https://community.mycollab.com/)
[![Github](https://img.shields.io/github/downloads/MyCollab/mycollab/total.svg)](https://github.com/MyCollab/mycollab/releases)


Expand Down Expand Up @@ -95,7 +95,7 @@ MyCollab requires a running Java Runtime Environment (8 or greater), Java comman

## Installation

The current MyCollab version is 5.4.10 released on 18th June, 2017. This branch focuses in monitoring, customize options for on-demand edition.
The current MyCollab version is 6.0.0 released on 30th August, 2018. This branch focuses in monitoring, customize options for on-demand edition.

1. Download MyCollab binary - https://www.mycollab.com/self-hosted/
2. Follow installation guideline at https://community.mycollab.com/docs/hosting-mycollab-on-your-own-server/installing-mycollab/
Expand Down
1 change: 0 additions & 1 deletion mycollab-app-community/.mycollab.pid

This file was deleted.

92 changes: 86 additions & 6 deletions mycollab-app-community/pom.xml
Expand Up @@ -12,17 +12,13 @@
</parent>
<packaging>jar</packaging>
<properties>
<dockerfile-maven-plugin.version>1.4.0</dockerfile-maven-plugin.version>
<installer.staging.dir>${project.build.directory}/staging</installer.staging.dir>
<installer.resource.dir.app>${basedir}/src/main/installer-resources</installer.resource.dir.app>
<staging.dir.app>${installer.staging.dir}</staging.dir.app>
</properties>

<dependencies>
<dependency>
<groupId>com.mycollab</groupId>
<artifactId>mycollab-client-api</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mycollab</groupId>
Expand Down Expand Up @@ -82,6 +78,12 @@
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -110,6 +112,62 @@
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<executions>
<execution>
<id>default-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/classes</outputDirectory>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>#</delimiter>
</delimiters>
<resources>
<resource>
<directory>src/main/resources/</directory>
<filtering>true</filtering>
<includes>
<include>config/*.yml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources/</directory>
<filtering>false</filtering>
<excludes>
<exclude>config/*.yml</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>docker-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/</outputDirectory>
<resources>
<resource>
<directory>src/main/docker/</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.yml</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
Expand Down Expand Up @@ -237,7 +295,7 @@
</copy>
<copy todir="${installer.staging.dir}/config">
<fileset dir="${basedir}/src/main/config">
<exclude name="mycollab.properties"/>
<exclude name="application.properties"/>
</fileset>
</copy>
<copy todir="${installer.staging.dir}/logs">
Expand All @@ -249,6 +307,7 @@
<copy todir="${installer.staging.dir}/lib">
<fileset dir="${basedir}/src/main/lib"/>
</copy>
<chmod dir="${installer.staging.dir}/bin/" includes="*.sh" perm="700"/>
</target>
</configuration>
</execution>
Expand All @@ -274,6 +333,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile-maven-plugin.version}</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>build</goal>
<!--
<goal>push</goal>
-->
</goals>
</execution>
</executions>
<configuration>
<repository>mycollab/mycollab</repository>
<tag>latest</tag>
<contextDirectory>${project.build.directory}</contextDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -1,22 +1,28 @@
#=====================================================
# You can visit link https://community.mycollab.com/configuration/
# You can visit link https://community.mycollab.com/docs/hosting-mycollab-on-your-own-server/advanced-configuration/
# to get all configuration fieldBuilder and their meanings
#=====================================================

#=====================================================
# SITE CONFIGURATION
#=====================================================
site.name=${sitename}
server.address=${serveraddress}
app.siteName=${sitename}
app.notifyEmail=${mailNotify}

server.address=${serveraddress}
server.apiUrl=https://api.mycollab.com/
server.storageSystem=file
server.siteUrl=http://%s:%d/
server.resourceDownloadUrl=http://%s:%d/file/
server.cdnUrl=http://%s:%d/assets/

#=====================================================
# DATABASE CONFIGURATION
#=====================================================
db.driverClassName=com.mysql.jdbc.Driver
db.url=${dbUrl}
db.username=${dbUser}
db.password=${dbPassword}
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=${dbUrl}
spring.datasource.username=${dbUser}
spring.datasource.password=${dbPassword}

#=====================================================
# MAIL CONFIGURATION
Expand All @@ -27,9 +33,8 @@ mail.smtphost=${smtpAddress}
mail.port=${smtpPort}
mail.username=${smtpUserName}
mail.password=${smtpPassword}
mail.isTLS=${smtpTLSEnable}
mail.isSSL=${smtpSSLEnable}
mail.notify=${mailNotify}
mail.startTls=${smtpTLSEnable}
mail.ssl=${smtpSSLEnable}

#=====================================================
# ERROR REPORTING
Expand Down
23 changes: 0 additions & 23 deletions mycollab-app-community/src/main/config/application.yml

This file was deleted.

14 changes: 14 additions & 0 deletions mycollab-app-community/src/main/docker/Dockerfile
@@ -0,0 +1,14 @@
FROM openjdk:8-jre-alpine
MAINTAINER Hai Nguyen <hainguyen@mycollab.com>

ENTRYPOINT ["/usr/bin/java", "-jar", "/usr/share/mycollab/executor.jar", "-noverify"]

ADD staging/bin /usr/share/mycollab/bin
ADD staging/config /usr/share/mycollab/config
ADD staging/i18n /usr/share/mycollab/i18n
# Add Maven dependencies (not shaded into the artifact; Docker-cached)
ADD staging/lib /usr/share/mycollab/lib
# Add the service itself
ADD staging/executor.jar /usr/share/mycollab/executor.jar

EXPOSE 8080
25 changes: 25 additions & 0 deletions mycollab-app-community/src/main/docker/app.yml
@@ -0,0 +1,25 @@
version: '3.1'
services:
hlsoft-mysql:
image: mysql:8.0.11
restart: always
hostname: mysql
command: mysqld --default-authentication-plugin=mysql_native_password
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: mycollab123
MYSQL_DATABASE: mycollab
hlsoft-app:
image: mycollab/mycollab
environment:
- SPRING_PROFILES_ACTIVE=prod
- JAVA_OPTS=-Djgroups.tcp.address=NON_LOOPBACK -Djava.net.preferIPv4Stack=true -Xmx2g -Xms2g
- ES_JAVA_OPTS= -Xms750m -Xmx750m
tty: true
ports:
- 8080:8080
links:
- hlsoft-mysql
depends_on:
- hlsoft-mysql
12 changes: 12 additions & 0 deletions mycollab-app-community/src/main/docker/mysql.yml
@@ -0,0 +1,12 @@
version: '3.1'
services:
hlsoft-mysql:
image: mysql:8.0.11
restart: always
hostname: mysql
command: mysqld --default-authentication-plugin=mysql_native_password
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: mycollab123
MYSQL_DATABASE: mycollab
9 changes: 9 additions & 0 deletions mycollab-app-community/src/main/resources/banner.txt
@@ -0,0 +1,9 @@

===================================================================================================================
___ ___ _ _ ___ ___ __ __ ___ ____ ___ ___ ___ ___ ___ ___ __ __ __ __ __ ______ _ _
||\\//|| \\// // // \\ || || // \\ || )) // // \\ ||\\//|| ||\\//|| || || ||\ || || | || | \\//
|| \/ || )/ (( (( )) || || ||=|| ||=) (( (( )) || \/ || || \/ || || || ||\\|| || || )/
|| || // \\__ \\_// ||__| ||__| || || ||_)) \\__ \\_// || || || || \\_// || \|| || || //

Version 6.0.0
===================================================================================================================
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion mycollab-app-community/src/main/scripts/mycollab.bat
Expand Up @@ -18,6 +18,7 @@ rem Required to run the with the "debug" argument.
rem ---------------------------------------------------------------------------

set _RUNJAVA=java
set MYCOLLAB_PORT=8080
set MYCOLLAB_OPTS=-noverify -server -Xms394m -Xmx768m -XX:NewSize=128m -XX:+DisableExplicitGC -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC

rem Suppress Terminate batch job on CTRL+C
Expand Down Expand Up @@ -85,7 +86,7 @@ goto execCmd

rem Execute Java with the applicable properties
cd ..
%_EXECJAVA% -jar executor.jar %* %MYCOLLAB_OPTS%
%_EXECJAVA% -jar executor.jar %* %MYCOLLAB_OPTS% -Dserver.port=%MYCOLLAB_PORT%
goto end

:end
3 changes: 2 additions & 1 deletion mycollab-app-community/src/main/scripts/mycollab.sh
Expand Up @@ -20,6 +20,7 @@
# -----------------------------------------------------------------------------
# OS specific support. $var _must_ be set to either true or false.

export MYCOLLAB_PORT=8080
export MYCOLLAB_OPTS=-noverify -server -Xms394m -Xmx768m -XX:NewSize=128m -XX:+DisableExplicitGC -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC

cygwin=false
Expand Down Expand Up @@ -153,7 +154,7 @@ if [ "$1" = "--start" ] ; then
shift
touch "$MYCOLLAB_OUT"
cd ..
eval \"$_RUNJAVA\" -jar $MYCOLLAB_HOME/executor.jar $MYCOLLAB_OPTS &
eval \"$_RUNJAVA\" -jar $MYCOLLAB_HOME/executor.jar $MYCOLLAB_OPTS -Dserver.port=$MYCOLLAB_PORT &

if [ ! -z "$MYCOLLAB_PID" ]; then
echo $! > "$MYCOLLAB_PID"
Expand Down
2 changes: 1 addition & 1 deletion mycollab-caching/pom.xml
Expand Up @@ -33,7 +33,7 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-spring-boot-starter-embedded</artifactId>
<version>2.0.0.Alpha1</version>
<version>2.0.0.Beta1</version>
</dependency>

</dependencies>
Expand Down
Expand Up @@ -22,20 +22,18 @@ import org.infinispan.commons.api.BasicCache
import org.infinispan.context.Flag
import org.infinispan.manager.EmbeddedCacheManager
import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Profile
import org.springframework.stereotype.Service

/**
* @author MyCollab Ltd
* @since 5.1.4
*/
@Service
@Profile("production")
class InfinispanCacheService(private val instance: EmbeddedCacheManager) : CacheService {

override fun putValue(group: String, key: String, value: Any) {
val cache = getCache(group)
cache.put(key, value)
cache[key] = value
}

private fun getCache(group: String): BasicCache<String, Any> {
Expand Down
Expand Up @@ -21,14 +21,12 @@ import org.infinispan.configuration.cache.ConfigurationBuilder
import org.infinispan.spring.starter.embedded.InfinispanCacheConfigurer
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Profile

@Configuration
@Profile("production")
open class CacheConfiguration {
class CacheConfiguration {

@Bean
open fun cacheConfigurer(): InfinispanCacheConfigurer {
fun cacheConfigurer(): InfinispanCacheConfigurer {
return InfinispanCacheConfigurer {
val ispnConfig = ConfigurationBuilder()
.clustering()
Expand Down

0 comments on commit 152ef15

Please sign in to comment.