More info about this project you will find on my personal website
Enterprise-class application for managing a ski rental company. Created using Jakarta EE with EJB specifications. This application can be run on any application server that supports Java 17, Jakarta EE 9, Jakarta Servlet API 6 and EJB, such as Apache TomEE, Glassfish or JBoss/Wildfly.
I realize that the specification of servlets, JSP pages and monolithic applications is no longer a standard today. This application was created only for learning purposes and familiarization with older "legacy" technologies.
- Clone and install
- Prepare configuration and run
- Manage Mailboxes via SSH
- Tech stack
- Author
- Project status
- License
To install the program on your computer, use the command below (or use the build-in GIT system in your IDE environment):
$ git clone https://github.com/Milosz08/ski-rental-service
- Before run project, insert application properties in
.env
file:
SKI_DEV_S3_USERNAME=<Minio S3 access key for AWS SDK>
SKI_DEV_S3_PASSWORD=<Minio S3 secret key for AWS SDK>
SKI_DEV_MYSQL_USERNAME=<database username>
SKI_DEV_MYSQL_PASSWORD=<database password>
SKI_DEV_MAILHOG_USERNAME=<mailhog username, by default: mailhoguser (check .volumes/mail/mailhog-auth.txt file)>
SKI_DEV_MAILHOG_PASSWORD=<mailhog password, by default: root (check .volumes/mail/mailhog-auth.txt file)>
SKI_DEV_SSH_HOST=<optional, for creating email addresses in production>
SKI_DEV_SSH_LOGIN=<optional, for creating email addresses in production>
Important
If you run this project as standalone application without using Docker containers, this variables should be provided as exported environment variables.
- To run project via Docker technology move to root project directory and type:
$ docker-compose up -d
This command will create 4 Docker containers:
- ski-mailhog-smtp - simple mail server, for development purposes,
- ski-minio-s3 - Minio S3 file storage server,
- ski-mysql-db - MySQL application database,
- ski-rental-app - TomEE application server with exploded .war archive of this application
Default application ports (can be changed by editing .env
file):
Application | Port | Description |
ski-mailhog-smtp | 7591 | SMTP server api port |
7592 | SMTP server web iterface | |
ski-minio-s3 | 7593 | Minio S3 api for AWS SDK for Java |
7594 | Minio S3 web interface | |
ski-mysql-db | 7590 | MySQL database port |
ski-rental-app | 7595 | TomEE server with application |
Note
Application by default run with docker
profile. To change profile (dev
, docker
or prod
),
change SKI_ENVIRONMENT
environment variable.
Accessed in src/main/resources/ssh/ssh.cfg.xml
, run commands only for prod
environment.
<?xml version="1.0" encoding="UTF-8"?>
<ssh-configuration>
<property name="ssh.host">${SKI_SSH_HOST}</property>
<property name="ssh.login">${SKI_SSH_LOGIN}</property>
<property name="ssh.private-key.path">${SKI_SSH_PRIVATE_KEY_PATH}</property>
<property name="ssh.known-hosts.path">${SKI_SSH_KNOWN_HOSTS_PATH}</property>
<commands>
<create-mailbox>
<!-- create mailbox command -->
</create-mailbox>
<update-mailbox-password>
<!-- change mailbox password command -->
</update-mailbox-password>
<delete-mailbox>
<!-- delete mailbox command -->
</delete-mailbox>
<set-mailbox-capacity>
<!-- set mailbox capacity command -->
</set-mailbox-capacity>
</commands>
</ssh-configuration>
- Java (Jakarta) EE 9
- EJB (Enterprise Java Beans)
- MySQL relational database system
- JSP (views) + JSTL
- Jakarta Mail Api (mail sender) + Freemarker (templates)
- Hibernate (ORM system) + C3P0 (connection pool) + Liquibase (database migrations)
- Bootstrap, jQuery, PopperJS
- Barcode4J - bar codes generator
- iText - pdf documents generator
- Apache TomEE application server with Docker technology
Created by Miłosz Gilga. If you have any questions about this application, send message: personal@miloszgilga.pl.
Project is finished.
This application is on Apache 2.0 License.