Skip to content

Instantly share code, notes, and snippets.

@s-petit
Last active July 29, 2021 19:08
Show Gist options
  • Select an option

  • Save s-petit/05f4a74d12f2f372310919eee4c80df6 to your computer and use it in GitHub Desktop.

Select an option

Save s-petit/05f4a74d12f2f372310919eee4c80df6 to your computer and use it in GitHub Desktop.
Plusieurs Tomcats avec Cargo et Gradle
  • creer un repertoire dedie pour deployer le cargo dans /tmp et donner tous les droits en chmod (ecriture)
  • ne pas oublier de changer aussi le port 4200 du frontend et le port visé dans le proxy.conf.json
  • changer la valeur du env etcd pour eviter des locks sur les queues rabbits (la queue est crée a partir de cette valeur)
  • changer le nom du pool hikari
cargo {
    containerId = "tomcat9x"
    port = 8081

    val deployable = com.bmuschko.gradle.cargo.convention.Deployable()
    deployable.context = "/"
    deployables = listOf(deployable)

    val localConfiguration = com.bmuschko.gradle.cargo.convention.CargoLocalTaskConvention()

    val tomcatInstaller = com.bmuschko.gradle.cargo.convention.ZipUrlInstaller()
    tomcatInstaller.installConfiguration = tomcat
    tomcatInstaller.downloadDir = file("$buildDir/tomcat/archive")
    tomcatInstaller.extractDir = file("$buildDir/tomcat")
    localConfiguration.zipUrlInstaller = tomcatInstaller
    
        val cargoHome = "/tmp/cargo-develop"

    localConfiguration.homeDir = File(cargoHome)
    localConfiguration.configHomeDir = File(cargoHome)

    localConfiguration.containerProperties.properties = mapOf(Pair("cargo.rmi.port", 8206), Pair("cargo.tomcat.ajp.port", 9999))


    localConfiguration.jvmArgs = """
        -Xms1024m
        -Xmx1024m
        -Dlogback.configurationFile=${project.projectDir}/src/testFixtures/resources/logback-dev.xml
        -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4004 (ligne a supprimer en cas de conflit)
    """.trimIndent()

    local = localConfiguration
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment