retold-data-service 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,50 @@
1
+ FROM debian:latest
2
+ MAINTAINER steven velozo
3
+
4
+ RUN echo "...installing debian dependencies..."
5
+ RUN apt update
6
+ RUN apt install vim curl tmux -y
7
+
8
+ RUN echo "Building service image..."
9
+
10
+ RUN echo "...configuring mariadb (mysql) server..."
11
+ RUN apt install default-mysql-server default-mysql-client -y
12
+ RUN sed -i "s|bind-address|#bind-address|g" /etc/mysql/mariadb.conf.d/50-server.cnf
13
+ COPY ./debug/model/manual_scripts/MySQL-Security.sql /root/MySQL-Configure-Security.sql
14
+ COPY ./debug/model/manual_scripts/MySQL-Laden-Entry-ServicesOnly.sh /usr/bin/MySQL-Laden-Entry-NoSudo.sh
15
+ RUN ( mysqld_safe --skip-grant-tables --skip-networking & ) && sleep 5 && mysql -u root < /root/MySQL-Configure-Security.sql
16
+
17
+ # Import the initial database
18
+ COPY ./debug/model/sql_create/BookStore-CreateDatabase.mysql.sql /root/MySQL-Create-Databases.sql
19
+ COPY ./debug/model/sql_create/BookStore-CreateAndPopulateTables.sql /root/BookStore-CreateAndPopulateTables.sql
20
+ RUN service mariadb restart && sleep 5 && mysql -u root -p"123456789" -e "CREATE DATABASE bookstore;"
21
+ RUN echo "...creating and populating database..."
22
+ RUN service mariadb restart && sleep 5 && mysql -u root -p"123456789" bookstore < /root/MySQL-Create-Databases.sql
23
+ RUN service mariadb restart && sleep 5 && mysql -u root -p"123456789" bookstore < /root/BookStore-CreateAndPopulateTables.sql
24
+ RUN echo "...database creation and population complmete."
25
+
26
+ RUN echo "...mapping library specific volumes..."
27
+
28
+ VOLUME /retold-data-service
29
+
30
+ SHELL ["/bin/bash", "-c"]
31
+
32
+ RUN echo "...installing node version manager..."
33
+
34
+ # Because there is a .bashrc chicken/egg problem, we will create one here to simulate logging in. This is not great.
35
+ RUN touch /root/.bashrc && chmod +x /root/.bashrc
36
+ RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
37
+
38
+ ENV NODE_VERSION=14
39
+ ENV NVM_DIR=/root/.nvm
40
+ RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
41
+ RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
42
+ RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
43
+ ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
44
+ RUN . /root/.nvm/nvm.sh && source /root/.bashrc && node --version
45
+ RUN . /root/.nvm/nvm.sh && npm --version
46
+
47
+ WORKDIR /retold-data-service
48
+
49
+ COPY ./debug/model/manual_scripts/MySQL-Laden-Entry-ServicesOnly.sh /root/MySQL-Laden-Entry-ServicesOnly.sh
50
+ ENTRYPOINT ["/root/MySQL-Laden-Entry-ServicesOnly.sh"]
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "Product": "MeadowEndpointsTestBookStore",
3
3
  "ProductVersion": "1.0.0",
4
-
5
4
  "UUID":
6
5
  {
7
6
  "DataCenter": 0,
@@ -13,9 +12,7 @@
13
12
  "streamtype": "console"
14
13
  }
15
14
  ],
16
-
17
15
  "APIServerPort": 8087,
18
-
19
16
  "MySQL":
20
17
  {
21
18
  "Server": "127.0.0.1",
@@ -25,6 +22,5 @@
25
22
  "Database": "bookstore",
26
23
  "ConnectionPoolLimit": 20
27
24
  },
28
-
29
25
  "MeadowConnectionMySQLAutoConnect": true
30
26
  }
@@ -0,0 +1,28 @@
1
+ #!/bin/bash
2
+
3
+ # trap 'kill -TERM $PID' TERM INT
4
+
5
+ # /usr/bin/entrypoint.sh --bind-addr "0.0.0.0:8080" . &
6
+
7
+ # PID=$!
8
+
9
+ # sleep 2
10
+
11
+ service mariadb restart
12
+
13
+ # wait $PIDj
14
+ # trap - TERM INT
15
+ # wait $PID
16
+ # EXIT_STATUS=$?
17
+ # echo "Service exited with status ${EXIT_STATUS}"
18
+
19
+ # /root/.nvm/nvm.sh
20
+ sleep 2
21
+
22
+ source /root/.bashrc
23
+ npm install
24
+ npm start
25
+
26
+ cd debug
27
+ node Harness.js
28
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "retold-data-service",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Serve up a whole model!",
5
5
  "main": "source/Retold-Data-Service.js",
6
6
  "scripts": {
@@ -10,7 +10,11 @@
10
10
  "build": "npx quack build",
11
11
  "docker-dev-build": "docker build ./ -f Dockerfile_LUXURYCode -t retold-data-service-image:local",
12
12
  "docker-dev-run": "docker run -it -d --name retold-data-service-dev -p 44444:8080 -p 43306:3306 -p 48086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/retold-data-service\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" retold-data-service-image:local",
13
- "docker-dev-shell": "docker exec -it retold-data-service-dev /bin/bash"
13
+ "docker-dev-shell": "docker exec -it retold-data-service-dev /bin/bash",
14
+ "docker-service-build": "docker build ./ -f Dockerfile_Service -t retold-data-service-server-image:local",
15
+ "docker-service-run-test": "docker run -it --init -d --name retold-data-service -p 8086:8086 -p 43306:3306 -v \"$(pwd):/retold-data-service:z\" -u \"$(id -u):$(id -g)\" retold-data-service-server-image:local",
16
+ "docker-service-run": "docker run -it --init -d --name retold-data-service -p 8086:8086 -p 43306:3306 -v \"$(pwd):/retold-data-service:z\" retold-data-service-server-image:local",
17
+ "docker-service-shell": "docker exec -it retold-data-service /bin/bash"
14
18
  },
15
19
  "mocha": {
16
20
  "diff": true,
@@ -46,15 +50,17 @@
46
50
  },
47
51
  "homepage": "https://github.com/stevenvelozo/retold-data-service",
48
52
  "devDependencies": {
49
- "quackage": "^1.0.28"
53
+ "quackage": "^1.0.41"
50
54
  },
51
55
  "dependencies": {
52
- "fable": "^3.0.112",
53
- "fable-serviceproviderbase": "^3.0.12",
56
+ "fable": "^3.1.11",
57
+ "fable-serviceproviderbase": "^3.0.15",
54
58
  "meadow": "^2.0.15",
55
59
  "meadow-connection-mysql": "^1.0.4",
56
60
  "meadow-endpoints": "^4.0.5",
57
- "orator": "^4.0.3",
58
- "orator-serviceserver-restify": "^2.0.3"
61
+ "orator": "^5.0.1",
62
+ "orator-http-proxy": "^1.0.1",
63
+ "orator-serviceserver-restify": "^2.0.4",
64
+ "orator-static-server": "^1.0.1"
59
65
  }
60
66
  }
@@ -42,7 +42,12 @@ suite
42
42
  AutoStartOrator: true
43
43
  });
44
44
 
45
- tmpRetoldDataService.initializeService(()=>{return fDone()});
45
+ tmpRetoldDataService.initializeService(
46
+ ()=>
47
+ {
48
+ // The data service created an orator
49
+ _Fable.Orator.stopService(fDone);
50
+ });
46
51
  }
47
52
  );
48
53
  }
@@ -0,0 +1,66 @@
1
+ !Book
2
+ @IDBook
3
+ %GUIDBook
4
+ &CreateDate
5
+ #CreatingIDUser
6
+ &UpdateDate
7
+ #UpdatingIDUser
8
+ ^Deleted
9
+ &DeleteDate
10
+ #DeletingIDUser
11
+ $Title 200
12
+ $Type 32
13
+ $Genre 128
14
+ $ISBN 64
15
+ $Language 12
16
+ $ImageURL 254
17
+ #PublicationYear
18
+
19
+ !BookAuthorJoin
20
+ @IDBookAuthorJoin
21
+ %GUIDBookAuthorJoin
22
+ #IDBook -> IDBook
23
+ #IDAuthor -> IDAuthor
24
+
25
+ !Author
26
+ @IDAuthor
27
+ %GUIDAuthor
28
+ &CreateDate
29
+ #CreatingIDUser
30
+ &UpdateDate
31
+ #UpdatingIDUser
32
+ ^Deleted
33
+ &DeleteDate
34
+ #DeletingIDUser
35
+ $Name 200
36
+
37
+ !BookPrice
38
+ @IDBookPrice
39
+ %GUIDBookPrice
40
+ &CreateDate
41
+ #CreatingIDUser
42
+ &UpdateDate
43
+ #UpdatingIDUser
44
+ ^Deleted
45
+ &DeleteDate
46
+ #DeletingIDUser
47
+ .Price 8,2
48
+ &StartDate
49
+ &EndDate
50
+ ^Discountable
51
+ $CouponCode 16
52
+ #IDBook -> IDBook
53
+
54
+ !Review
55
+ @IDReviews
56
+ %GUIDReviews
57
+ &CreateDate
58
+ #CreatingIDUser
59
+ &UpdateDate
60
+ #UpdatingIDUser
61
+ ^Deleted
62
+ &DeleteDate
63
+ #DeletingIDUser
64
+ *Text
65
+ #Rating
66
+ #IDBook -> IDBook