24 lines
638 B
Groovy
24 lines
638 B
Groovy
plugins {
|
|
id 'base'
|
|
}
|
|
|
|
task copyWebapp(type: Copy) {
|
|
dependsOn ':webapp:build'
|
|
from '../webapp/dist/inse/browser'
|
|
into 'build/webapp'
|
|
}
|
|
|
|
task createImage(type: Exec) {
|
|
dependsOn ':service:build', copyWebapp
|
|
commandLine 'docker', 'build', '--platform', "${targetPlatform}", '--build-arg', "IMAGE=${imagePrefix}-service:${imageVersion}", '-t', "${imagePrefix}-app:${imageVersion}", '.'
|
|
}
|
|
|
|
task run(type: Exec) {
|
|
dependsOn createImage
|
|
commandLine 'docker', 'run', '--rm', '-e', 'INSE_AUTH_STANDALONE=true', '-p', '8080:8000', "${imagePrefix}-app:${imageVersion}", 'run'
|
|
}
|
|
|
|
build {
|
|
dependsOn createImage
|
|
}
|