This project is a Java EE / Jakarta EE backend deployed on Payara Server.
It provides REST services for contact management and uses a MariaDB database.
The project is fully containerized with Docker, and a GitHub Actions workflow is used to build and automatically publish the backend Docker image.
- Java EE / Jakarta EE backend packaged as a WAR and deployed on Payara Server.
- MariaDB database for storing contact information.
- Docker Compose for orchestrating Payara + MariaDB.
- GitHub Actions to build and push the Docker image automatically.
- Shell script
./config/startup-server.shfor easy local server startup.
.
├── config/
│ ├── mariadb-java-client-3.5.5.jar # MariaDB JDBC driver
│ ├── setup-jdbc.sh # Script to configure JDBC in Payara
│ └── startup-server.sh # Script to start backend via Docker Compose
├── src/ # Java source code
├── target/
│ └── contact-backend.war # WAR package generated after build
├── Dockerfile # Backend Payara Docker image
├── docker-compose.yml # Payara + MariaDB orchestration
└── README.md # Project documentation- Docker and Docker Compose installed
- Maven (to build the project locally if needed)
- JDK 21
The GitHub Actions workflow:
- Builds the project using Maven (
mvn clean package). - Builds the Docker image for the backend.
- Pushes the image to Docker Hub (or another container registry).
👉 See .github/workflows/build.yml for the workflow configuration.
A script is provided to simplify server startup:
./config/startup-server.shThis script:
-
Pull the Docker images if needed.
-
Starts Payara and MariaDB via Docker Compose.
-
Follows the backend logs automatically.
-
Backend REST (Payara): http://localhost:8080
-
Payara Admin Console: http://localhost:4848
-
MariaDB: port
3306(configured indocker-compose.yml)
To stop and clean up the containers:
docker compose downTo also remove the volumes (
docker compose down -v-
MariaDB credentials (user, password, database) can be changed in
docker-compose.yml. -
The
setup-jdbc.shscript automatically configures the connection pool and JDBC resource in Payara. -
You can customize the Payara image using the
Dockerfile.