Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy to tomcat subdomain #202

Open
MVTec opened this issue May 6, 2020 · 0 comments
Open

deploy to tomcat subdomain #202

MVTec opened this issue May 6, 2020 · 0 comments

Comments

@MVTec
Copy link

MVTec commented May 6, 2020

I want to deploy x.war in tomcat using cargo plugin "com.bmuschko.cargo-base".
This application runs on subdomain and has a non default appBase.
Moreover behind loadbalancer on two Servers x1.y.de and x2.y.de

tomcat server.xml

<Host
				name="x.y.de"
				debug="0"
				appBase="x_webapps"
				...		
</Host>

defined servers as below in build.gradle

def servers =[
	'x.y.de': [
		'configPath': 'properties/prod/x',
		'remote': [
			[
				'hostname': 'x1.y.de',
				'port': 80,
				'username': 'abc',
				'password': '...'
			],
			[
				'hostname': 'x2.y.de',
				'port': 80,
				'username': 'abc',
				'password': '...'
			]
		]
	]
]

using this for deployment

servers.each { host, server ->
	server.get('remote').each { config ->
		def serverName = config.hostname.replace('.', '').replace('-', '').capitalize()

		task "deployRemote${serverName}"(type: com.bmuschko.gradle.cargo.tasks.remote.CargoRedeployRemote) {
			description = "Deploys WAR to remote Tomcat '${config.name}'."
			containerId = 'tomcat8x'
			hostname = config.hostname
			port = config.port
			username = config.username
			password = config.password
		}
	}
}

This works for application in webapps directory but nor for the ones with subdomain
Any idea, how to get it working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant