Skip to content

Commit 3b8dc33

Browse files
committed
Message Board Hibernate Demo
1 parent 8385ad8 commit 3b8dc33

File tree

83 files changed

+26854
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+26854
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Compiled source #
2+
###################
3+
*.com
4+
*.class
5+
*.dll
6+
*.exe
7+
*.o
8+
*.so
9+
10+
# Build tool #
11+
##############
12+
target
13+
.idea
14+
*.iml
15+
*.im
16+
*.ipr
17+
*.iws
18+
.settings
19+
.project
20+
.classpath
21+
22+
# OS generated files #
23+
######################
24+
*~
25+
.DS_Store
26+
.DS_Store?
27+
._*
28+
.Spotlight-V100
29+
.Trashes
30+
Icon?
31+
ehthumbs.db
32+
Thumbs.db
33+
34+
activemq-data
35+
*.epoch
36+
*.log
37+
38+
# Message Board #
39+
#################
40+
41+
script/nocontent
42+
script/account-service
43+
script/message-service
44+
script/message-board-web
45+
!*sh
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Hibernate Demo: Message Board
2+
Data MicroService Demo.
3+
4+
Made with Hibernate ORM, Hibernate OGM and Infinispan for OpenShift Container Platform.
5+
6+
## Install demo
7+
----
8+
cd script
9+
10+
oc login -u [YOUR-USER-NAME]
11+
oc new-project [YOUR-PROJECT-NAME]
12+
13+
sh ./install-all.sh
14+
----
15+
16+
## Update Account MicroService
17+
----
18+
cd script
19+
sh ./binary-build-account.sh
20+
----
21+
22+
## Update Message MicroService
23+
----
24+
cd script
25+
sh ./binary-build-message.sh
26+
----
27+
28+
## Test
29+
30+
### Web [FORM]
31+
32+
[YOUR-USER-NAME] is your OCP username like **developer**
33+
[YOUR-PROJECT-NAME] is your OCP project like **message-board**
34+
[YOUR-IP] is a generate IP by OCP like **192.168.42.120**
35+
36+
----
37+
http://web-message-board.[YOUR-IP].nip.io
38+
----
39+
40+
click on __andrea__ or __fabio__
41+
42+
### Message MicroService [REST]
43+
#### with proxy
44+
----
45+
http://web-message-board.[YOUR-IP].nip.io/message-service/messages?username=andrea
46+
----
47+
#### without proxy
48+
----
49+
http://message-service-message-board.[YOUR-IP].nip.io/message-service/messages?username=andrea
50+
----
51+
52+
### Account MicroService [REST]
53+
#### with proxy
54+
----
55+
http://web-message-board.[YOUR-IP].nip.io/account-service/user
56+
----
57+
#### without proxy
58+
----
59+
http://account-service-message-board.[YOUR-IP].nip.io/account-service/user
60+
----
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
worker_processes auto;
2+
error_log stderr;
3+
pid /var/opt/rh/rh-nginx112/run/nginx/nginx.pid;
4+
5+
# Load dynamic modules. See /opt/rh/rh-nginx112/root/usr/share/doc/README.dynamic.
6+
include /opt/rh/rh-nginx112/root/usr/share/nginx/modules/*.conf;
7+
8+
events {
9+
worker_connections 1024;
10+
}
11+
12+
http {
13+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
14+
'$status $body_bytes_sent "$http_referer" '
15+
'"$http_user_agent" "$http_x_forwarded_for"';
16+
17+
sendfile on;
18+
tcp_nopush on;
19+
tcp_nodelay on;
20+
keepalive_timeout 65;
21+
types_hash_max_size 2048;
22+
23+
include /etc/opt/rh/rh-nginx112/nginx/mime.types;
24+
default_type application/octet-stream;
25+
26+
# Load modular configuration files from the /etc/nginx/conf.d directory.
27+
# See http://nginx.org/en/docs/ngx_core_module.html#include
28+
# for more information.
29+
include /opt/app-root/etc/nginx.d/*.conf;
30+
31+
server {
32+
listen 8080 default_server;
33+
listen [::]:8080 default_server;
34+
server_name _;
35+
root /opt/app-root/src;
36+
37+
# Load configuration files for the default server block.
38+
include /opt/app-root/etc/nginx.default.d/*.conf;
39+
40+
location / {
41+
alias /opt/app-root/src/;
42+
try_files $uri$args $uri$args/ $uri/ /index.html;
43+
}
44+
45+
error_page 404 /404.html;
46+
location = /40x.html {
47+
}
48+
49+
error_page 500 502 503 504 /50x.html;
50+
location = /50x.html {
51+
}
52+
53+
# Add MicroServices here
54+
location /message-service {
55+
proxy_pass http://message-service:8080/message-service;
56+
}
57+
58+
location /account-service {
59+
proxy_pass http://account-service:8080/account-service;
60+
}
61+
62+
}
63+
64+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"project": {
4+
"name": "message-board-ui"
5+
},
6+
"apps": [
7+
{
8+
"root": "src",
9+
"outDir": "dist",
10+
"assets": [
11+
"assets",
12+
"favicon.ico"
13+
],
14+
"index": "index.html",
15+
"main": "main.ts",
16+
"polyfills": "polyfills.ts",
17+
"test": "test.ts",
18+
"tsconfig": "tsconfig.app.json",
19+
"testTsconfig": "tsconfig.spec.json",
20+
"prefix": "app",
21+
"styles": [
22+
"styles.css"
23+
],
24+
"scripts": [],
25+
"environmentSource": "environments/environment.ts",
26+
"environments": {
27+
"dev": "environments/environment.ts",
28+
"prod": "environments/environment.prod.ts"
29+
}
30+
}
31+
],
32+
"e2e": {
33+
"protractor": {
34+
"config": "./protractor.conf.js"
35+
}
36+
},
37+
"lint": [
38+
{
39+
"project": "src/tsconfig.app.json",
40+
"exclude": "**/node_modules/**"
41+
},
42+
{
43+
"project": "src/tsconfig.spec.json",
44+
"exclude": "**/node_modules/**"
45+
},
46+
{
47+
"project": "e2e/tsconfig.e2e.json",
48+
"exclude": "**/node_modules/**"
49+
}
50+
],
51+
"test": {
52+
"karma": {
53+
"config": "./karma.conf.js"
54+
}
55+
},
56+
"defaults": {
57+
"styleExt": "css",
58+
"component": {}
59+
}
60+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/dist-server
6+
/tmp
7+
/out-tsc
8+
9+
# dependencies
10+
/node_modules
11+
12+
# IDEs and editors
13+
/.idea
14+
.project
15+
.classpath
16+
.c9/
17+
*.launch
18+
.settings/
19+
*.sublime-workspace
20+
21+
# IDE - VSCode
22+
.vscode/*
23+
!.vscode/settings.json
24+
!.vscode/tasks.json
25+
!.vscode/launch.json
26+
!.vscode/extensions.json
27+
28+
# misc
29+
/.sass-cache
30+
/connect.lock
31+
/coverage
32+
/libpeerconnection.log
33+
npm-debug.log
34+
yarn-error.log
35+
testem.log
36+
/typings
37+
38+
# e2e
39+
/e2e/*.js
40+
/e2e/*.map
41+
42+
# System Files
43+
.DS_Store
44+
Thumbs.db
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
#ng build --target production --output-path ../script/message-board-web
4+
npm install
5+
ng build --output-path ../script/message-board-web

0 commit comments

Comments
 (0)