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.

Comments:

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