{"id":16144268,"url":"https://github.com/ryanj/targetlocations","last_synced_at":"2025-04-06T20:15:07.981Z","repository":{"id":16803025,"uuid":"19561838","full_name":"ryanj/targetlocations","owner":"ryanj","description":"Target Store Locations built with with Leaflet Maps, JAXRS, and MongoDB","archived":false,"fork":false,"pushed_at":"2014-05-09T00:46:38.000Z","size":380,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-13T02:16:06.754Z","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/ryanj.png","metadata":{"files":{"readme":"README","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":"2014-05-08T05:37:41.000Z","updated_at":"2022-11-04T13:57:18.000Z","dependencies_parsed_at":"2022-07-13T13:51:21.645Z","dependency_job_id":null,"html_url":"https://github.com/ryanj/targetlocations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Ftargetlocations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Ftargetlocations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Ftargetlocations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Ftargetlocations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanj","download_url":"https://codeload.github.com/ryanj/targetlocations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543597,"owners_count":20955865,"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-10-10T00:12:08.281Z","updated_at":"2025-04-06T20:15:07.942Z","avatar_url":"https://github.com/ryanj.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Repo layout\n=========== \ndeployments/ - location for built wars (Details below)\nsrc/ - Maven src structure\npom.xml - Maven build file  \n.openshift/ - location for openshift specific files\n.openshift/config/ - location for configuration files such as standalone.xml (used to modify jboss config such as datasources) \n.openshift/action_hooks/pre_build - Script that gets run every git push before the build (on the CI system if available)\n.openshift/action_hooks/build - Script that gets run every git push as part of the build process (on the CI system if available)\n.openshift/action_hooks/deploy - Script that gets run every git push after build but before the app is restarted\n.openshift/action_hooks/post_deploy - Script that gets run every git push after the app is restarted\n.openshift/action_hooks/pre_start_jbosseap-6.0 - Script that gets run prior to starting EAP6.0\n.openshift/action_hooks/post_start_jbosseap-6.0 - Script that gets run after EAP6.0 is started\n.openshift/action_hooks/pre_stop_jbosseap-6.0 - Script that gets run prior to stopping EAP6.0\n.openshift/action_hooks/post_stop_jbosseap-6.0 - Script that gets run after EAP6.0 is stopped\n.openshift/markers - directory for files used to control application behavior. See README in markers directory\n\n\nNotes about layout\n==================\nNote: Every time you push, everything in your remote repo dir gets recreated\n      please store long term items (like an sqlite database) in the OpenShift\n      data directory, which will persist between pushes of your repo.\n      The OpenShift data directory is accessible relative to the remote repo\n      directory (../data) or via an environment variable OPENSHIFT_DATA_DIR.\n\n\nDetails about layout and deployment options\n==================\nThere are two options for deploying content to the JBoss Application Server within OpenShift. Both options\ncan be used together (i.e. build one archive from source and others pre-built)\n\nNOTE: Under most circumstances the .dodeploy file markers should not be added to the deployments directory.\nThese lifecycle files will be created in the runtime deployments directory (can be seen by SSHing into the application),\nbut should not be added to the git repo.\n\n1) (Preferred) You can upload your content in a Maven src structure as is this sample project and on \ngit push have the application built and deployed.  For this to work you'll need your pom.xml at the \nroot of your repository and a maven-war-plugin like in this sample to move the output from the build\nto the deployments directory.  By default the warName is ROOT within pom.xml.  This will cause the \nwebapp contents to be rendered at http://app_name-namespace.rhcloud.com/.  If you change the warName in \npom.xml to app_name, your base url would then become http://app_name-namespace.rhcloud.com/app_name.\n\nNote: If you are building locally you'll also want to add any output wars/ears under deployments \nfrom the build to your .gitignore file.\n\nNote: If you are running scaled EAP6.0 then you need an application deployed to the root context (i.e. \nhttp://app_name-namespace.rhcloud.com/) for the HAProxy load-balancer to recognize that the EAP6.0 instance \nis active.\n\nor\n\n2) You can git push pre-built wars into deployments/.  To do this\nwith the default repo you'll want to first run 'git rm -r src/ pom.xml' from the root of your repo.\n\nBasic workflows for deploying pre-built content (each operation will require associated git add/commit/push operations to take effect):\n\nA) Add new zipped content and deploy it:\n\n1. cp target/example.war deployments/\n\nB) Add new unzipped/exploded content and deploy it:\n\n1. cp -r target/example.war/ deployments/\n2. edit .openshift/config/standalone.xml and replace\n\u003cdeployment-scanner path=\"deployments\" relative-to=\"jboss.server.base.dir\" scan-interval=\"5000\" deployment-timeout=\"300\"/\u003e\nwith \n\u003cdeployment-scanner path=\"deployments\" relative-to=\"jboss.server.base.dir\" scan-interval=\"5000\" deployment-timeout=\"300\" auto-deploy-exploded=\"true\"/\u003e\n\nC) Undeploy currently deployed content:\n\n1. git rm deployments/example.war\n\nD) Replace currently deployed zipped content with a new version and deploy it:\n\n1. cp target/example.war deployments/\n\nE) Replace currently deployed unzipped content with a new version and deploy it:\n\n1. git rm -rf deployments/example.war/\n2. cp -r target/example.war/ deployments/\n\nNote: You can get the information in the uri above from running 'rhc domain show'\n\nIf you have already committed large files to your git repo, you rewrite or reset the history of those files in git\nto an earlier point in time and then 'git push --force' to apply those changes on the remote OpenShift server.  A \ngit gc on the remote OpenShift repo can be forced with (Note: tidy also does other cleanup including clearing log\nfiles and tmp dirs):\n\nrhc app tidy -a appname\n\n\nWhether you choose option 1) or 2) the end result will be the application \ndeployed into the deployments directory. The deployments directory in the \nJBoss Application Server distribution is the location end users can place \ntheir deployment content (e.g. war, ear, jar, sar files) to have it \nautomatically deployed into the server runtime.\n\nEnvironment Variables\n=====================\n\nOpenShift provides several environment variables to reference for ease\nof use.  The following list are some common variables but far from exhaustive:\n\n    System.getenv(\"OPENSHIFT_APP_NAME\")  - Application name\n    System.getenv(\"OPENSHIFT_DATA_DIR\")  - For persistent storage (between pushes)\n    System.getenv(\"OPENSHIFT_TMP_DIR\")   - Temp storage (unmodified files deleted after 10 days)\n    System.getenv(\"OPENSHIFT_INTERNAL_IP\")  - The IP address used to bind EAP6.0\n\nWhen embedding a database using 'rhc app cartridge add', you can reference environment\nvariables for username, host and password. For example, when embedding MySQL 5.1, the \nfollowing variables will be available:\n\n    System.getenv(\"OPENSHIFT_MYSQL_DB_HOST\")      - DB host\n    System.getenv(\"OPENSHIFT_MYSQL_DB_PORT\")      - DB Port\n    System.getenv(\"OPENSHIFT_MYSQL_DB_USERNAME\")  - DB Username\n    System.getenv(\"OPENSHIFT_MYSQL_DB_PASSWORD\")  - DB Password\n\nTo get a full list of environment variables, simply add a line in your\n.openshift/action_hooks/build script that says \"export\" and push.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanj%2Ftargetlocations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanj%2Ftargetlocations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanj%2Ftargetlocations/lists"}