{"id":18291206,"url":"https://github.com/rhecosystemappeng/postgresql-orm-quickstart","last_synced_at":"2025-07-02T15:36:24.703Z","repository":{"id":41146299,"uuid":"386445863","full_name":"RHEcosystemAppEng/postgresql-orm-quickstart","owner":"RHEcosystemAppEng","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-10T14:54:08.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T10:40:22.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RHEcosystemAppEng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-15T23:02:33.000Z","updated_at":"2022-08-10T14:54:12.000Z","dependencies_parsed_at":"2022-09-09T07:50:43.533Z","dependency_job_id":null,"html_url":"https://github.com/RHEcosystemAppEng/postgresql-orm-quickstart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RHEcosystemAppEng/postgresql-orm-quickstart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fpostgresql-orm-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fpostgresql-orm-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fpostgresql-orm-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fpostgresql-orm-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RHEcosystemAppEng","download_url":"https://codeload.github.com/RHEcosystemAppEng/postgresql-orm-quickstart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fpostgresql-orm-quickstart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263166760,"owners_count":23424234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T14:13:31.283Z","updated_at":"2025-07-02T15:36:24.432Z","avatar_url":"https://github.com/RHEcosystemAppEng.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quarkus demo: Hibernate ORM and RESTEasy\n\nThis is a minimal CRUD service exposing a couple of endpoints over REST,\nwith a front-end based on Angular so you can play with it from your browser.\n\nWhile the code is surprisingly simple, under the hood this is using:\n - RESTEasy to expose the REST endpoints\n - Hibernate ORM to perform the CRUD operations on the database\n - A PostgreSQL database; see below to run one via Docker\n - ArC, the CDI inspired dependency injection tool with zero overhead\n - The high performance Agroal connection pool\n - Infinispan based caching\n - All safely coordinated by the Narayana Transaction Manager\n\n## Requirements\n\nTo compile and run this demo you will need:\n\n- JDK 11+\n- GraalVM\n\nIn addition, you will need either a PostgreSQL database, or Docker to run one.\n\n### Configuring GraalVM and JDK 11+\n\nMake sure that both the `GRAALVM_HOME` and `JAVA_HOME` environment variables have\nbeen set, and that a JDK 11+ `java` command is on the path.\n\nSee the [Building a Native Executable guide](https://quarkus.io/guides/building-native-image)\nfor help setting up your environment.\n\n## Building the demo\n\nLaunch the Maven build on the checked out sources of this demo:\n\n\u003e ./mvnw install\n\n## Running the demo\n\n### Live coding with Quarkus\n\nThe Maven Quarkus plugin provides a development mode that supports\nlive coding. To try this out:\n\n\u003e ./mvnw quarkus:dev\n\nIn this mode you can make changes to the code and have the changes immediately applied, by just refreshing your browser.\n\nHot reload works even when modifying your JPA entities.\nTry it! Even the database schema will be updated on the fly.\n\n### Run Quarkus in JVM mode\n\nWhen you're done iterating in developer mode, you can run the application as a\nconventional jar file.\n\nFirst compile it:\n\n\u003e ./mvnw install\n\nNext we need to make sure you have a PostgreSQL instance running (Quarkus automatically starts one for dev and test mode). To set up a PostgreSQL database with Docker:\n\n\u003e docker run --ulimit memlock=-1:-1 -it --rm=true --memory-swappiness=0 --name quarkus_test -e POSTGRES_USER=quarkus_test -e POSTGRES_PASSWORD=quarkus_test -e POSTGRES_DB=quarkus_test -p 5432:5432 postgres:11.5\n\nConnection properties for the Agroal datasource are defined in the standard Quarkus configuration file,\n`src/main/resources/application.properties`.\n\nThen run it:\n\n\u003e java -jar ./target/quarkus-app/quarkus-run.jar\n\nHave a look at how fast it boots.\nOr measure total native memory consumption...\n\n### Run Quarkus as a native application\n\nYou can also create a native executable from this application without making any\nsource code changes. A native executable removes the dependency on the JVM:\neverything needed to run the application on the target platform is included in\nthe executable, allowing the application to run with minimal resource overhead.\n\nCompiling a native executable takes a bit longer, as GraalVM performs additional\nsteps to remove unnecessary codepaths. Use the  `native` profile to compile a\nnative executable:\n\n\u003e ./mvnw install -Dnative\n\nAfter getting a cup of coffee, you'll be able to run this binary directly:\n\n\u003e ./target/hibernate-orm-quickstart-1.0.0-SNAPSHOT-runner\n\nPlease brace yourself: don't choke on that fresh cup of coffee you just got.\n    \nNow observe the time it took to boot, and remember: that time was mostly spent to generate the tables in your database and import the initial data.\n    \nNext, maybe you're ready to measure how much memory this service is consuming.\n\nN.B. This implies all dependencies have been compiled to native;\nthat's a whole lot of stuff: from the bytecode enhancements that Hibernate ORM\napplies to your entities, to the lower level essential components such as the PostgreSQL JDBC driver, the Undertow webserver.\n\n## See the demo in your browser\n\nNavigate to:\n\n\u003chttp://localhost:8080/index.html\u003e\n\nHave fun, and join the team of contributors!\n\n## Running the demo in Kubernetes\n\nThis section provides extra information for running both the database and the demo on Kubernetes.\nAs well as running the DB on Kubernetes, a service needs to be exposed for the demo to connect to the DB.\n\nThen, rebuild demo docker image with a system property that points to the DB. \n\n```bash\n-Dquarkus.datasource.jdbc.url=jdbc:postgresql://\u003cDB_SERVICE_NAME\u003e/quarkus_test\n```\n\n## pushing image to quay.io \n\n./mvnw clean package -Dquarkus.container-image.build=true\nmvn clean package -DskipTests -Pnative -Dquarkus.native.container-build=true  -Dquarkus.native.container-runtime=docker\n\nread article for more details: https://fuangwith.medium.com/quarkus-build-image-and-push-to-quay-io-b126b78c072e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhecosystemappeng%2Fpostgresql-orm-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhecosystemappeng%2Fpostgresql-orm-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhecosystemappeng%2Fpostgresql-orm-quickstart/lists"}