Adam Bien's Weblog

Payara Server "Full", Autodeployment and Docker

Payara server comes with disabled autodeployment feature, what makes deployments at start in containerized environments, like Docker or clouds, more challenging.

Fortunately, Payara Server 172 introduced the --postbootcommandfile flag.

asadmin commands like e.g. deploy can be read from a file specified with the postbootcommandfile flag and executed after successful Payara's start, e.g.: asadmin start-domain --verbose --postbootcommandfile commands.txt. The postbootcommandfile feature makes deployments at boottime even more predictable.

All Payara-related docklands Dockerfiles are using the "postbootcommandfile" feature already. Also the hub.docker.com/u/airhacks/ airhacks/payara and airhacks/payara-derby were updated.

To start a Thin WAR (=kB) microservice, you only have to write these two lines in a Dockerfile:

        
        FROM airhacks/payara
        COPY ./target/micro.war ${DEPLOYMENT_DIR}
        
    

See you at Java EE Microservices. Is Munich's airport too far? Learn from home: javaeemicro.services.


NEW workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
Online Workshops
...the last 150 posts
...the last 10 comments
License