Skip to content

Commit

Permalink
Fixes piranhacloud#4534 - Update documentation for Piranha Servlet (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem authored Jan 19, 2025
1 parent 22658e5 commit 60929cb
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion dist/servlet/src/site/markdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,50 @@ The following components are available in the Piranha Servlet distribution:
* Jakarta Servlet
* Jakarta WebSocket

## Documentation
## Download Piranha Servlet

Piranha Servlet is available as a JAR file from Maven Central.

The download link below will take you to the location on Maven Central where you
can download any version of Piranha Servlet Select the version by clicking
on the directory link and then download the JAR file from there.

<a href="https://repo1.maven.org/maven2/cloud/piranha/dist/piranha-dist-servlet/">Download</a>

Note the name of the JAR file you want to download should look like
piranha-dist-servlet-X.Y.Z.jar

## Quickstart

Assuming you have downloaded the JAR file as previously indicated running
Piranha Servlet is as simple as:

```
java -jar piranha-dist-servlet-X.Y.Z.jar --war-file your-webapplication.war
```

## Running using Docker

If you want to run Piranha Servlet using Docker we have a base image
available for you using Eclipse Temurin as the underlying runtime.

See https://github.com/piranhacloud/piranha/pkgs/container/servlet for
more information and how to pull that image.

To use this as a base image you would create your own Dockerfile and add your
WAR file using a COPY and change the CMD to point to your WAR file as
illustrated below:

```Dockerfile
FROM ghcr.io/piranhacloud/servlet:latest
COPY target/my.war my.war
USER root
RUN chown -R piranha:piranha /home/piranha
USER piranha
CMD ["java", "-jar", "piranha-dist-servlet.jar", "--war-file", "my.war"]
```

## Guides

1. [Create a Hello World web application](create_a_hello_world_web_application.html)
1. [Create a Jakarta Pages application](create_a_jakarta_pages_application.html)
Expand Down

0 comments on commit 60929cb

Please sign in to comment.