This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 227
/
docker-compose.gradle
36 lines (31 loc) · 2.5 KB
/
docker-compose.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import static org.opendatakit.aggregate.gradle.Util.setPropertiesValue
String buildTarget = "${buildDir}/docker-compose".toString()
task dockerComposeClean() {
delete "${buildTarget}"
}
task dockerComposeBuild(dependsOn: [build, dockerComposeClean], type: Copy) {
into "${buildTarget}"
from fileTree(dir: 'docker-compose')
into('webapps/ROOT') {
from zipTree("${buildDir}/libs/${archivesBaseName}-${version}.war")
}
doLast {
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/jdbc.properties", "jdbc.url", "jdbc:postgresql://db/aggregate?autoDeserialize=true")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/jdbc.properties", "jdbc.username", "aggregate")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/jdbc.properties", "jdbc.password", "aggregate")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/jdbc.properties", "jdbc.schema", "aggregate")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.realm.realmString", "ODK Aggregate")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.channelType", "ANY_CHANNEL")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.superUserUsername", "administrator")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.superUser", "")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.port", "80")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.securePort", "443")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.deviceAuthentication", "digest")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.hostname", "")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.server.secureChannelType", "ANY_CHANNEL")
setPropertiesValue("${buildTarget}/webapps/ROOT/WEB-INF/classes/security.properties", "security.help.about", "auto-generated on 1970-01-01T00:00:00+0000 for ODK Aggregate")
println ""
println "Your Docker Compose build for Aggregate is in build/docker-compose."
println "Please, refer to https://github.com/getodk/aggregate/tree/master/docs/build-and-run-with-docker-compose.md for instructions."
}
}