Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Deployment question

36 views
Skip to first unread message

Tim Uckun

unread,
Feb 2, 2016, 3:58:53 AM2/2/16
to jobsworth
Hi All.

I know very little about tomcat so I hope this question is not too naive.

I see that there are some erb templates to generate some yaml and xml files but I see no deployment scripts or rake tasks to generate those files and push them to the server.

Also do I need to separately put the context.xml on the tomcat server?  I presume there is a context.xml for every app so why isn't there a place to put in app itself?

Thanks.

Aristedes Maniatis

unread,
Feb 2, 2016, 5:27:26 AM2/2/16
to jobs...@googlegroups.com
When you download the war file you get everything bundled, including all the erb templates.

context.xml is the place in tomcat where you define the external properties to pass to the application. Typically this is things like the JDBC connection, mail server and other properties the application needs. It is convenient because the war file is then completely replacable. Upgrade the application by just replacing the war file and touching nothing else.


Ari
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "jobsworth" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jobsworth+...@googlegroups.com <mailto:jobsworth+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001 fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A

signature.asc

Tim Uckun

unread,
Feb 2, 2016, 6:04:16 AM2/2/16
to jobs...@googlegroups.com
If I create my own war  file does tomcat know to pick up the config.xml from the config directory or do I have to put it in place manually?

Also when do the migrations run? I could not see any command which triggers the migrations.



To unsubscribe from this group and stop receiving emails from it, send an email to jobsworth+...@googlegroups.com.

Aristedes Maniatis

unread,
Feb 2, 2016, 6:07:16 AM2/2/16
to jobs...@googlegroups.com
On 2/02/2016 10:04pm, Tim Uckun wrote:
> If I create my own war file does tomcat know to pick up the config.xml from the config directory or do I have to put it in place manually?

context.xml normally goes into the conf directory in tomcat

> Also when do the migrations run? I could not see any command which triggers the migrations.

The code sorts that out automatically when the app is first launched.

Ari
signature.asc

Tim Uckun

unread,
Feb 2, 2016, 2:55:17 PM2/2/16
to jobs...@googlegroups.com

context.xml normally goes into the conf directory in tomcat



Again please excuse my ignorance....

Does it get put there by tomcat from the war file or do I put it there myself.  Also is there one context.xml for the entire server or one per app?


Thanks.

Aristedes Maniatis

unread,
Feb 2, 2016, 5:53:01 PM2/2/16
to jobs...@googlegroups.com
Tomcat deployment is mostly quite simple. You run the tomcat application (the installer package will put a startup script in the right place on your platform). You edit the files in the conf directory. Think of context.xml as a way to pass parameters to the applications. There are other config files like server.xml but mostly you can leave them alone.

Then just drop the war files into the webapps folder. The name of the war file is important by default (although this can be edited in the config). So an application called myapp.war will result in tomcat sending any requests which start with /myapp/ to that application. An application called ROOT.war is a special case and will get all requests not otherwise directed to another app.

So let's say you have:

webapps
- manager.war
- ROOT.war

The manager app gets all requests to /manager/ and the ROOT app gets everything else.
signature.asc

Tim Uckun

unread,
Feb 2, 2016, 8:45:19 PM2/2/16
to jobs...@googlegroups.com
How do I get it to respond to myapp.mydomain.com rather than mydomain.com/myapp 

Do I have to have nginx or something in front of it?

Vikrant Chaudhary

unread,
Feb 3, 2016, 12:33:54 AM2/3/16
to jobs...@googlegroups.com
You'll have to configure your web-server to point myapp.mydomain.com
to the deployed war.

__

Vikrant Chaudhary
http://webstream.io
Reply all
Reply to author
Forward
0 new messages