This is an example project, used to learn about Java, Spring Boot and SQL.
Run using Podman (for Docker replace podman
with docker
and podman-compose
with docker compose
):
podman-compose build airport airplane-module steward-module
podman-compose up airport
podman-compose down airport
# or
cd airplane-module
podman build -f Dockerfile -t airplane-module
podman run -t airplane-module -e PORT=8081
cd steward-module
podman build -f Dockerfile -t steward-module
podman run -t steward-module -e PORT=8082
cd airport
podman build -f Dockerfile -t airport
podman run -t airport -e airport_url="http://localhost:8081/" -e steward_url="http://localhost:8082/"
Run using Gradle:
PORT=8081 gradle :airplane-module:bootRun
PORT=8082 gradle :steward-module:bootRun
PORT=8080 airplane_url="http://localhost:8081/" steward_url="http://localhost:8082/" gradle :airport:bootRun
Documentation is available at
- Airport: http://localhost:8080/docs
- Airplane module: http://localhost:8081/docs
- Steward module: http://localhost:8082/docs
Example for airplane-module
:
# compile project
gradle :airplane-module:build
# just run
gradle :airplane-module:bootRun
PORT=8081 gradle :airplane-module:bootRun
# cleanup and run
gradle clean bootRun
# compile and run
gradle :airplane-module:bootJar
java -jar ./build/libs/airplane-module-*.jar
# remove podman images
podman rmi localhost/airplane-module localhost/airport localhost/steward-module
podman images