File tree 5 files changed +70
-0
lines changed
hibernate-ogm/hiking-demo/src
5 files changed +70
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ Based on the following http://redhat.slides.com/ebernard/bean-validation-2?token
7
7
8
8
== Installation
9
9
10
+ [NOTE]
11
+ ====
12
+ All bash scripts are in `./src/script`.
13
+ They must be run from their hosting directory.
14
+ ====
15
+
10
16
* run `mvn clean install`
11
17
* copy `./target/wildfly-*` in `./wildfly-*` (for manual run)
12
18
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Released under ASL 2.0, see project root
3
+
4
+ # Assumes the script is run from its home dir
5
+ # assumes HTTPie is present
6
+ echo " http POST http://localhost:8080/hibernate-ogm-hiking-demo-1.0-SNAPSHOT/hiking-manager/orders/ < orderCreation.json"
7
+ echo " \n"
8
+ cat orderCreation.json
9
+ http POST http://localhost:8080/hibernate-ogm-hiking-demo-1.0-SNAPSHOT/hiking-manager/orders/ < orderCreation.json
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ function help {
4
+ echo " Usage:"
5
+ echo " ./$TOOL start"
6
+ echo " ./$TOOL stop"
7
+ echo " internal usage is docker_service {start|stop} docker_image <arg like -p 1234:1234 -e ABC=DEF> <comamnd to run from the docker container>"
8
+ exit -1
9
+ }
10
+
11
+ function docker_service {
12
+ if [[ $# -eq 4 ]]; then
13
+ OP=$1
14
+ TOOL=$2
15
+ ARGS=$3
16
+ COMMAND=$4
17
+
18
+ SANITIZED_TOOL=$TOOL
19
+ # strip org name
20
+ if [[ $SANITIZED_TOOL == * " /" * ]]; then
21
+ SANITIZED_TOOL=$( echo $SANITIZED_TOOL | cut -d " /" -f2)
22
+ fi
23
+ # Remplace : with - if a tag is used
24
+ if [[ $SANITIZED_TOOL == * " :" * ]]; then
25
+ NAME=$( echo $SANITIZED_TOOL | cut -d " :" -f1)
26
+ TAG=$( echo $SANITIZED_TOOL | cut -d " :" -f2)
27
+ SANITIZED_TOOL=" $NAME -$TAG "
28
+ fi
29
+ case $OP in
30
+ " start" )
31
+ docker stop $SANITIZED_TOOL
32
+ docker rm $SANITIZED_TOOL
33
+ docker run --name $SANITIZED_TOOL $ARGS -d $TOOL $COMMAND
34
+ docker logs -f $SANITIZED_TOOL
35
+ ;;
36
+ " stop" )
37
+ docker stop $SANITIZED_TOOL
38
+ ;;
39
+ " logs" )
40
+ docker logs -f $SANITIZED_TOOL
41
+ ;;
42
+ * )
43
+ help $TOOL
44
+ ;;
45
+ esac
46
+ else
47
+ help
48
+ fi
49
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ source docker-service.sh
4
+ ARGS=" -p 27017:27017"
5
+
6
+ docker_service $1 mongo " $ARGS " " "
File renamed without changes.
You can’t perform that action at this time.
0 commit comments