Hydra 订单管理系统
HOMS is an open source web application for order and business process management.
Application consists of three parts:
Requirements:
Compatibility:
Resources:
The preferred way to install HOMS is to use Docker.
Download docker-compose.yml and default .env config file:
wget https://raw.githubusercontent.com/latera/homs/master/docker-compose.yml
wget https://raw.githubusercontent.com/latera/homs/master/.env.sample -O .env :pushpin: All variables are set in .env file. There you can change them, if you want to.
For OS X users: make path to folder with config shared in Docker -> Preferences... -> File Sharing.
Set SECRET_KEY_BASE variable in your .env with uniq id as value. You can generate key with openssl rand -hex 64 command. For example:
SECRET_KEY_BASE=0750fd0eac13032778f0a42e2ab450003eaece477ea881501be0cc438f870a2f498dbbc00ffb7c8379c30c960568a402d315496bb7bc2b3ee324401ba788a:warning: Make sure this key is secret and don't share it with anyone.
Change Minio credentials in .env file. Generate MINIO_ACCESS_KEY and MINIO_SECRET_KEY values with any credentials generator, e.g. pwgen 32 2.
Set MINIO_CONSOLE_PORT in .env file.
Run docker-compose:
docker-compose up -dNavigate to Minio control panel and create a bucket with name equal to MINIO_BUCKET_NAME value from .env file.
Login to HydraOMS with [email protected]/changeme. Now you are able to start Pizza Order demo process.
You can login to Camunda Admin interface with credentials equal to BPM_USER:BPM_PASSWORD values from .env file (user/changeme if these variables aren't set).
Follow the instructions below:
Without Oracle Instant Client (default way).
Navigate to Minio control panel and create a bucket with name equal to MINIO_BUCKET_NAME value from .env file.
Export all variables from .env file
export $(cat .env | xargs)Change in bpm.yml value of development.base_url from http://camunda:8080/engine-rest/ to http://localhost:8766/engine-rest/
In database.yml change value of development.host from `` to localhost
Install Yarn and run:
yarn installCompile assets:
yarn devStart HOMS application in another console tab:
rails sCreate and populate the database (adds an admin user, initial order types, and orders):
rails db:migrate
export SEED_DB=true
rails db:seedLog in at HydraOMS with [email protected]/changeme.
bundle updateyarn upgrade-interactive --latestRequirements:
For using SSO with HOMS:
company, department.| Name | Mapper type | User attribute | Token clain name | Claim JSON type | Add to ID token | Add to access token | Add to userinfo | Multivalued | Aggregate attributes values |
|---|---|---|---|---|---|---|---|---|---|
company |
User Attribute |
company |
company |
string | On | On | On | Off | Off |
department |
User Attribute |
department |
department |
string | On | On | On | Off | Off |
homs_configuration.yml:sso:
enabled: true
use_regular_login: true
service_user:
login: "service_user_login"
password: "service_user_password"
keycloak:
auth_server_url: "http://keycloak_host:keycloak_port/auth/"
realm: hydra
client_id: homs
redirect_uri: "http://homs_host:homs_port/authenticate_by_keycloak"
secret: "af9504fc-b030-405e-97b6-813220c07a7e"
logout_redirect: "http://homs_host:homs_port"
scope:
- homsservice_user is required when SSO is enabled on Camunda but HOMS users log in via regular login (use_regular_login: true). The widget authenticates to Keycloak with these credentials to obtain tokens for Camunda API calls. A single service user is shared across all Camunda instances configured for the widget.
Set cadidate_starters.enabled in hbw.yml to true to send user email to camunda when fetching business processes definition. That way you can allow users to run only certain business processes.
The general development process is:
Issues can be reported by using GitHub Issues.
HOMS uses RSpec for unit/spec tests. You need to set up different testing database. Otherwise your development DB would be erased.
# Run all tests
bundle exec rspec spec
# Run a single test file
bundle exec rspec spec/PATH/TO/FILE_spec.rb
# Run a subset of tests
bundle exec rspec spec/PATH/TO/DIRHBW Widget uses jest and snapshots for tests.
# Run frontend tests
jest
# Update snapshots after intentionally changing implementation elements
jest --updateSnapshotTo upgrade PostgreSQL (HOMS database) to the 15.4 version, we recommend using the pg_dumpall utility:
db_homs as db_homs_new in docker-compose.ymldb_homs_new set image: postgres:15.4, change volume to ./data/homs_new/postgresql:$HOMS_DB_PATH, port to 15432:5432, container name to postgres-homs-newdb_homs_new and db_homs services docker-compose up db_homs db_homs_new. Wait for postgres instances to start updb_homs data to file: docker exec -it postgres-homs /usr/bin/pg_dumpall -U homs > dumpfiledb_homs_new: docker exec -i postgres-homs-new psql -U homs < dumpfiledb_homs_new and db_homs containers. Replace old volume: rm -rf ./data/homs && mv ./data/homs_new ./data/homsdb_homs set image: postgres:15.4, remove db_homs_new in docker-compose.ymlHOMS_DB_USER: source .env && docker exec -it postgres-homs psql -U $HOMS_DB_USER, \password, enter twice value of HOMS_DB_PASSWORD from .env file and enter quit;Copyright (c) 2019 Latera LLC under the Apache License.
暂无开放 Issues,或尚未同步最近议题。