-
Notifications
You must be signed in to change notification settings - Fork 14
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
1424 Add Menas Dockerfile #1429
Conversation
This is a 1st version PoC. In the next version, as a next step, we will be solving how to containerize without such a huge dependency on properties so we do not kill the portability that containers offer. |
EXPOSE 8009 | ||
|
||
RUN rm -rf /usr/local/tomcat/webapps/* | ||
COPY target/*.war /usr/local/tomcat/webapps/ROOT.war |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if you could try to package it as jar and just run the built jar instead of depending on Tomcat. If it's not a low hanging fruit, then it can be delayed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, a fat jar does not allow for any post-build server configuration. That would also mean problems with logging and persisting these. And in the end, we end up with a containerized application that is not portable.
Fat jar might be interesting to run a service ASAP for a PoC connection. But for it to be deployed, scaled and properly configured you will always choose a war. You don't want to have to rebuild/restart to change one or two values.
EXPOSE 8080 | ||
EXPOSE 8009 | ||
|
||
RUN rm -rf /usr/local/tomcat/webapps/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to remove all webapps? Doesn't this include the tomcat UIs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for any extra management through UI since it is a single tomcat app. But if you want it there, we can leave it there. This would mean playing with the URLs as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we figure out way to automatically ship logs somewhere central, I'd say you're right. We could put in fluentd agent to forward the logs into S3 or cloudwatch in future. For now I'd say it may be useful to keep the management UIs for POC purposes, but I'm happy to be challenged on this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the original webapps
have any implicit or explicit correlation with either Catalina(servlet container), Jasper (JSP Engine) or any other system component of Tomcat. So unless we need to have a management tool UI, there is no reason to keep them.
And honestly, I don't see the logs connection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy, I'm not sure what's on those UIs tbh. Had a hope that it could provide some useful info/tools for debugging. Even if the online war upload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For final version I would be for all removal. For POC maybe no need to bother?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For final version I would be for all removal. For POC maybe no need to bother?
PoC wise, this is easier for me. Later we might want to use tomcat:9-jdk8-openjdk-slim
image which produces half of the image size.
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
Closes #1424