Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
2ee0ffbf
Commit
2ee0ffbf
authored
May 27, 2017
by
Matija Obreza
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using setting data.dir as base for local file storage
parent
f480faea
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
14 deletions
+24
-14
docker/jetty/resources/genesys.properties
docker/jetty/resources/genesys.properties
+1
-2
src/main/java/org/genesys2/server/service/worker/WorldClimUpdater.java
.../org/genesys2/server/service/worker/WorldClimUpdater.java
+3
-3
src/main/java/org/genesys2/spring/config/ElasticsearchConfigDev.java
...va/org/genesys2/spring/config/ElasticsearchConfigDev.java
+13
-6
src/main/resources/spring/spring.properties
src/main/resources/spring/spring.properties
+4
-2
src/test/resources/spring/spring.properties
src/test/resources/spring/spring.properties
+3
-1
No files found.
docker/jetty/resources/genesys.properties
View file @
2ee0ffbf
...
...
@@ -18,5 +18,4 @@ db.showSql=false
db.hbm2ddl
=
true
hibernate.dialect
=
org.hibernate.dialect.MySQL5InnoDBDialect
download.files.dir
=
/data/genesys/temp
file.repository.dir
=
/data/genesys/persistent/repository
data.dir
=
/data/genesys/
src/main/java/org/genesys2/server/service/worker/WorldClimUpdater.java
View file @
2ee0ffbf
...
...
@@ -90,8 +90,8 @@ public class WorldClimUpdater implements InitializingBean {
// http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip
// http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/alt_2-5m_bil.zip
@Value
(
"${
download.files
.dir}"
)
private
String
download
Dir
;
@Value
(
"${
worldclim
.dir}"
)
private
String
worldclim
Dir
;
private
File
worldClimDir
;
...
...
@@ -110,7 +110,7 @@ public class WorldClimUpdater implements InitializingBean {
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
this
.
worldClimDir
=
new
File
(
downloadDir
,
"worldclim"
);
this
.
worldClimDir
=
new
File
(
worldclimDir
);
this
.
worldClimDir
.
mkdirs
();
}
...
...
src/main/java/org/genesys2/spring/config/ElasticsearchConfigDev.java
View file @
2ee0ffbf
...
...
@@ -16,11 +16,14 @@
package
org.genesys2.spring.config
;
import
static
org
.
elasticsearch
.
node
.
NodeBuilder
.*;
import
org.elasticsearch.client.node.NodeClient
;
import
org.elasticsearch.common.settings.ImmutableSettings
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.data.elasticsearch.client.NodeClientFactoryBean
;
@Configuration
@Profile
({
"dev"
})
...
...
@@ -35,11 +38,15 @@ public class ElasticsearchConfigDev {
@Value
(
"${elasticsearch.enable.http}"
)
private
boolean
enableHttp
;
@Value
(
"${elasticsearch.data.path}"
)
private
String
dataPath
;
@Bean
public
NodeClientFactoryBean
ncfb
()
{
NodeClientFactoryBean
ncfb
=
new
NodeClientFactoryBean
(
true
);
ncfb
.
setClusterName
(
clusterName
);
ncfb
.
setEnableHttp
(
enableHttp
);
return
ncfb
;
public
NodeClient
nodeClient
()
{
ImmutableSettings
.
Builder
settings
=
ImmutableSettings
.
settingsBuilder
().
put
(
"http.enabled"
,
String
.
valueOf
(
this
.
enableHttp
)).
put
(
"path.home"
,
this
.
dataPath
);
return
(
NodeClient
)
nodeBuilder
().
settings
(
settings
).
clusterName
(
this
.
clusterName
).
local
(
true
).
node
()
.
client
();
}
}
src/main/resources/spring/spring.properties
View file @
2ee0ffbf
...
...
@@ -48,7 +48,8 @@ captcha.siteKey=${captcha.publicKey}
captcha.publicKey
=
6Lfb5w4TAAAAAI6pD_4l5uIwXEaUJ6KQmhU9cyjx
# paths
download.files.dir
=
./data/
data.dir
=
./data
worldclim.dir
=
${data.dir}/worldclim
# ITPGRFA Easy-SMTA account (if you have one)
itpgrfa.easysmta.url
=
https://mls.planttreaty.org/itt/index.php?r=extsys/userinfo
...
...
@@ -148,6 +149,7 @@ elasticsearch.enable.http=true
# Connect to external ES nodes. Comma separated list of hostname:port
# elasticsearch.cluster.nodes=localhost:9300,otherhost:9300
elasticsearch.cluster.nodes
=
elasticsearch.data.path
=
${data.dir}/elastic
transifex.project
=
genesys-dev
transifex.username
=
Alexandr19011990
...
...
@@ -166,7 +168,7 @@ transifex.content.template=<html xmlns="http://www.w3.org/1999/xhtml">\
# File repository
file.repository.dir
=
${d
ownload.files
.dir}/repository
file.repository.dir
=
${d
ata
.dir}/repository
# File repository S3 parameter values
s3.accessKey
=
...
...
src/test/resources/spring/spring.properties
View file @
2ee0ffbf
...
...
@@ -38,7 +38,9 @@ captcha.publicKey=B
lucene.indexDir
=
./lucene/
# paths
download.files.dir
=
./data/
data.dir
=
./data
elasticsearch.data.path
=
${data.dir}/elastic
file.repository.dir
=
${data.dir}/repository
# ITPGRFA Easy-SMTA account (if you have one)
itpgrfa.easysmta.url
=
https://mls.planttreaty.org/itt/index.php?r=extsys/userinfo
...
...
Matija Obreza
@mobreza
mentioned in issue
#31 (closed)
·
May 27, 2017
mentioned in issue
#31 (closed)
mentioned in issue #31
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment