@things-factory/operato-mms 8.0.0-beta.8 → 8.0.0

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,64 @@
1
+ module.exports = {
2
+ useVirtualHostBasedDomain: true,
3
+ subdomainOffset: 2,
4
+ SECRET: '0xD58F835B69C217A76CA5FA7a70a1D0d4D79dAC63', // temporary...
5
+ email: {
6
+ host: 'smtp.office365.com', // your sender-email smtp host
7
+ port: 587, // smtp server port
8
+ secure: false, // true for 465, false for other ports
9
+ auth: {
10
+ user: 'your sender-email',
11
+ pass: 'your sender-email password' // generated ethereal password
12
+ },
13
+ secureConnection: false,
14
+ tls: {
15
+ ciphers: 'SSLv3'
16
+ }
17
+ },
18
+ logger: {
19
+ file: {
20
+ filename: 'logs/application-%DATE%.log',
21
+ datePattern: 'YYYY-MM-DD-HH',
22
+ zippedArchive: false,
23
+ maxSize: '20m',
24
+ maxFiles: '2d',
25
+ level: 'info'
26
+ },
27
+ console: {
28
+ level: 'silly'
29
+ }
30
+ },
31
+ ormconfig: {
32
+ name: 'default',
33
+ type: 'postgres',
34
+ host: 'postgres',
35
+ port: 5432,
36
+ database: 'postgres',
37
+ username: 'postgres',
38
+ password: 'abcd1234',
39
+ synchronize: true,
40
+ logging: true
41
+ },
42
+ marketplaceIntegrationLazada: {
43
+ platform: 'lazada',
44
+ application: 'operato-mms',
45
+ appKey: '11111111',
46
+ appSecret: '111111111111111111',
47
+ callback: 'https://mms.myoperato.com/callback-lazada'
48
+ },
49
+ marketplaceIntegrationShopee: {
50
+ platform: 'shopee',
51
+ isUAT: false,
52
+ application: 'Operato MMS',
53
+ partnerId: 1111111,
54
+ partnerKey: '11111111111111111'
55
+ },
56
+ fulfillmentIntegrationOperato: {
57
+ host: 'things-factory.com:3000',
58
+ platform: 'operato',
59
+ application: 'operato-mms',
60
+ appKey: '111111111-11111',
61
+ appSecret: '1111111111111111',
62
+ callback: 'https://mms.myoperato.com/callback-operato'
63
+ }
64
+ }
@@ -0,0 +1,42 @@
1
+ version: '3'
2
+ services:
3
+ nginx:
4
+ image: hatiolab/operato-nginx:latest
5
+ ports:
6
+ - ${HostPort}:80
7
+ depends_on:
8
+ - app
9
+ app:
10
+ build: .
11
+ container_name: operato-mms
12
+ image: hatiolab/operato-mms:latest
13
+ privileged: true
14
+ volumes:
15
+ - ./logs:/app/logs
16
+ - ./config.production.js:/app/config.production.js
17
+ ports:
18
+ - 4000:3000
19
+ depends_on:
20
+ - postgres
21
+ - mosquitto
22
+ logging:
23
+ driver: 'json-file'
24
+ options:
25
+ max-size: '100m'
26
+ max-file: '3'
27
+ postgres:
28
+ image: postgres:13.2
29
+ container_name: db-operato-mms
30
+ environment:
31
+ POSTGRES_PASSWORD: abcd1234
32
+ POSTGRES_USER: postgres
33
+ PGDATA: /var/lib/postgresql/data/pgdata
34
+ volumes:
35
+ - ./postgres_data:/var/lib/postgresql/data/pgdata
36
+ ports:
37
+ - '55432:5432'
38
+ mosquitto:
39
+ image: eclipse-mosquitto:1.6.12
40
+ ports:
41
+ - 1883:1883
42
+ - 9001:9001
@@ -0,0 +1,54 @@
1
+ if [ -f "config.production.js" ] ; then
2
+ echo "config.production.js exist"
3
+ else
4
+ echo "config.production.js create"
5
+ curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-mms/installer/config.production.js
6
+ fi
7
+
8
+ if [ -f "start.sh" ] ; then
9
+ echo "start.sh exist"
10
+ else
11
+ echo "start.sh create"
12
+ curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-mms/installer/start.sh
13
+ fi
14
+
15
+ if [ -f "stop.sh" ] ; then
16
+ echo "stop.sh exist"
17
+ else
18
+ echo "stop.sh create"
19
+ curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-mms/installer/stop.sh
20
+ fi
21
+
22
+ if [ -f "upgrade.sh" ] ; then
23
+ echo "upgrade.sh exist"
24
+ else
25
+ echo "upgrade.sh create"
26
+ curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-mms/installer/upgrade.sh
27
+ fi
28
+
29
+ if [ -f "migrate.sh" ] ; then
30
+ echo "migrate.sh exist"
31
+ else
32
+ echo "migrate.sh create"
33
+ curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-mms/installer/migrate.sh
34
+ fi
35
+
36
+ if [ -f "docker-compose.yml" ] ; then
37
+ echo "docker-compose.yml exist"
38
+ else
39
+ echo "docker-compose.yml create"
40
+ curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-mms/installer/docker-compose.yml
41
+ fi
42
+
43
+ chmod u+x start.sh
44
+ chmod u+x stop.sh
45
+ chmod u+x upgrade.sh
46
+ chmod u+x migrate.sh
47
+
48
+ echo "HostPort=3000" > .env
49
+
50
+ docker pull hatiolab/operato-mms:latest
51
+
52
+ docker pull hatiolab/operato-nginx:latest
53
+
54
+ docker-compose create
@@ -0,0 +1 @@
1
+ docker exec -it operato-mms npm run migration -- --mode=production
@@ -0,0 +1,33 @@
1
+ server {
2
+
3
+ server_name .myoperato.com; # shorter form for "myoperato.com *.myoperato.com"
4
+ access_log off;
5
+
6
+ location / {
7
+ proxy_pass http://localhost:4000;
8
+ proxy_set_header Host $host:$server_port;
9
+ proxy_set_header X-Forwarded-Host $server_name;
10
+ proxy_set_header X-Real-IP $remote_addr;
11
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12
+ proxy_set_header Upgrade $http_upgrade;
13
+ proxy_set_header Connection "upgrade";
14
+ proxy_http_version 1.1;
15
+ }
16
+
17
+ listen [::]:443 ssl ipv6only=on; # managed by Certbot
18
+ listen 443 ssl; # managed by Certbot
19
+ ssl_certificate /etc/letsencrypt/live/myoperato.com/fullchain.pem; # managed by Certbot
20
+ ssl_certificate_key /etc/letsencrypt/live/myoperato.com/privkey.pem; # managed by Certbot
21
+ include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
22
+ ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
23
+
24
+ }
25
+
26
+ server {
27
+ server_name .myoperato.com;
28
+
29
+ listen 80 default_server;
30
+ listen [::]:80 default_server;
31
+
32
+ return 301 https://$host$request_uri;
33
+ }
@@ -0,0 +1,18 @@
1
+ HOST_PORT=3000
2
+
3
+ if [ $# -eq 0 ] ; then
4
+ echo "Warning: default port 3000"
5
+ else
6
+ HOST_PORT=$1
7
+ fi
8
+
9
+
10
+ echo "HOST_PORT : ${HOST_PORT}"
11
+
12
+ echo "HostPort="$HOST_PORT > .env
13
+
14
+ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
15
+ xhost +"local:docker@"
16
+ fi
17
+
18
+ docker-compose up -d
@@ -0,0 +1 @@
1
+ docker-compose stop
@@ -0,0 +1 @@
1
+ curl -fsSL https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-mms/installer/install.sh | bash -s
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-mms",
3
- "version": "8.0.0-beta.8",
3
+ "version": "8.0.0",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -38,69 +38,69 @@
38
38
  "dependencies": {
39
39
  "@material/mwc-linear-progress": "^0.27.0",
40
40
  "@material/mwc-radio": "^0.27.0",
41
- "@operato/data-grist": "^8.0.0-beta",
42
- "@operato/ghost-print": "^8.0.0-beta",
43
- "@operato/oops": "^8.0.0-beta",
44
- "@operato/scene-chartjs": "^8.0.0-beta",
45
- "@operato/scene-clock": "^8.0.0-beta",
46
- "@operato/scene-clone": "^8.0.0-beta",
47
- "@operato/scene-compass": "^8.0.0-beta",
48
- "@operato/scene-data-transform": "^8.0.0-beta",
49
- "@operato/scene-excel": "^8.0.0-beta",
50
- "@operato/scene-form": "^8.0.0-beta",
51
- "@operato/scene-gauge": "^8.0.0-beta",
52
- "@operato/scene-google-map": "^8.0.0-beta",
53
- "@operato/scene-graphql": "^8.0.0-beta",
54
- "@operato/scene-grist": "^8.0.0-beta",
55
- "@operato/scene-half-roundrect": "^8.0.0-beta",
56
- "@operato/scene-indoor-map": "^8.0.0-beta",
57
- "@operato/scene-integration": "^8.0.0-beta",
58
- "@operato/scene-label": "^8.0.0-beta",
59
- "@operato/scene-legend": "^8.0.0-beta",
60
- "@operato/scene-marker": "^8.0.0-beta",
61
- "@operato/scene-news-ticker": "^8.0.0-beta",
62
- "@operato/scene-progressbar": "^8.0.0-beta",
63
- "@operato/scene-random": "^8.0.0-beta",
64
- "@operato/scene-restful": "^8.0.0-beta",
65
- "@operato/scene-switch": "^8.0.0-beta",
66
- "@operato/scene-tab": "^8.0.0-beta",
67
- "@operato/scene-table": "^8.0.0-beta",
68
- "@operato/scene-timer": "^8.0.0-beta",
69
- "@operato/scene-visualizer": "^8.0.0-beta",
70
- "@operato/scene-wheel-sorter": "^8.0.0-beta",
71
- "@things-factory/apptool-ui": "^8.0.0-beta.8",
72
- "@things-factory/attachment-base": "^8.0.0-beta.8",
73
- "@things-factory/auth-ui": "^8.0.0-beta.8",
74
- "@things-factory/biz-base": "^8.0.0-beta.8",
75
- "@things-factory/board-service": "^8.0.0-beta.8",
76
- "@things-factory/board-ui": "^8.0.0-beta.8",
77
- "@things-factory/code-ui": "^8.0.0-beta.8",
78
- "@things-factory/context-ui": "^8.0.0-beta.5",
79
- "@things-factory/dashboard": "^8.0.0-beta.8",
80
- "@things-factory/evaluation": "^8.0.0-beta.5",
81
- "@things-factory/export-ui": "^8.0.0-beta.5",
82
- "@things-factory/export-ui-csv": "^8.0.0-beta.5",
83
- "@things-factory/export-ui-excel": "^8.0.0-beta.5",
84
- "@things-factory/geography": "^8.0.0-beta.8",
85
- "@things-factory/help": "^8.0.0-beta.5",
86
- "@things-factory/i18n-base": "^8.0.0-beta.8",
87
- "@things-factory/integration-fulfillment": "^8.0.0-beta.8",
88
- "@things-factory/integration-lmd": "^8.0.0-beta.8",
89
- "@things-factory/lite-menu": "^8.0.0-beta.8",
90
- "@things-factory/marketplace-base": "^8.0.0-beta.8",
91
- "@things-factory/more-ui": "^8.0.0-beta.5",
92
- "@things-factory/notification": "^8.0.0-beta.8",
93
- "@things-factory/oauth2-client": "^8.0.0-beta.8",
94
- "@things-factory/pdf": "^8.0.0-beta.8",
95
- "@things-factory/product-base": "^8.0.0-beta.8",
96
- "@things-factory/resource-ui": "^8.0.0-beta.8",
97
- "@things-factory/setting-ui": "^8.0.0-beta.8",
98
- "@things-factory/system": "^8.0.0-beta.5",
99
- "@things-factory/warehouse-base": "^8.0.0-beta.8"
41
+ "@operato/data-grist": "^8.0.0",
42
+ "@operato/ghost-print": "^8.0.0",
43
+ "@operato/oops": "^8.0.0",
44
+ "@operato/scene-chartjs": "^8.0.0",
45
+ "@operato/scene-clock": "^8.0.0",
46
+ "@operato/scene-clone": "^8.0.0",
47
+ "@operato/scene-compass": "^8.0.0",
48
+ "@operato/scene-data-transform": "^8.0.0",
49
+ "@operato/scene-excel": "^8.0.0",
50
+ "@operato/scene-form": "^8.0.0",
51
+ "@operato/scene-gauge": "^8.0.0",
52
+ "@operato/scene-google-map": "^8.0.0",
53
+ "@operato/scene-graphql": "^8.0.0",
54
+ "@operato/scene-grist": "^8.0.0",
55
+ "@operato/scene-half-roundrect": "^8.0.0",
56
+ "@operato/scene-indoor-map": "^8.0.0",
57
+ "@operato/scene-integration": "^8.0.0",
58
+ "@operato/scene-label": "^8.0.0",
59
+ "@operato/scene-legend": "^8.0.0",
60
+ "@operato/scene-marker": "^8.0.0",
61
+ "@operato/scene-news-ticker": "^8.0.0",
62
+ "@operato/scene-progressbar": "^8.0.0",
63
+ "@operato/scene-random": "^8.0.0",
64
+ "@operato/scene-restful": "^8.0.0",
65
+ "@operato/scene-switch": "^8.0.0",
66
+ "@operato/scene-tab": "^8.0.0",
67
+ "@operato/scene-table": "^8.0.0",
68
+ "@operato/scene-timer": "^8.0.0",
69
+ "@operato/scene-visualizer": "^8.0.0",
70
+ "@operato/scene-wheel-sorter": "^8.0.0",
71
+ "@things-factory/apptool-ui": "^8.0.0",
72
+ "@things-factory/attachment-base": "^8.0.0",
73
+ "@things-factory/auth-ui": "^8.0.0",
74
+ "@things-factory/biz-base": "^8.0.0",
75
+ "@things-factory/board-service": "^8.0.0",
76
+ "@things-factory/board-ui": "^8.0.0",
77
+ "@things-factory/code-ui": "^8.0.0",
78
+ "@things-factory/context-ui": "^8.0.0",
79
+ "@things-factory/dashboard": "^8.0.0",
80
+ "@things-factory/evaluation": "^8.0.0",
81
+ "@things-factory/export-ui": "^8.0.0",
82
+ "@things-factory/export-ui-csv": "^8.0.0",
83
+ "@things-factory/export-ui-excel": "^8.0.0",
84
+ "@things-factory/geography": "^8.0.0",
85
+ "@things-factory/help": "^8.0.0",
86
+ "@things-factory/i18n-base": "^8.0.0",
87
+ "@things-factory/integration-fulfillment": "^8.0.0",
88
+ "@things-factory/integration-lmd": "^8.0.0",
89
+ "@things-factory/lite-menu": "^8.0.0",
90
+ "@things-factory/marketplace-base": "^8.0.0",
91
+ "@things-factory/more-ui": "^8.0.0",
92
+ "@things-factory/notification": "^8.0.0",
93
+ "@things-factory/oauth2-client": "^8.0.0",
94
+ "@things-factory/pdf": "^8.0.0",
95
+ "@things-factory/product-base": "^8.0.0",
96
+ "@things-factory/resource-ui": "^8.0.0",
97
+ "@things-factory/setting-ui": "^8.0.0",
98
+ "@things-factory/system": "^8.0.0",
99
+ "@things-factory/warehouse-base": "^8.0.0"
100
100
  },
101
101
  "devDependencies": {
102
- "@things-factory/builder": "^8.0.0-beta.4",
102
+ "@things-factory/builder": "^8.0.0",
103
103
  "@types/node-fetch": "^2.5.7"
104
104
  },
105
- "gitHead": "bf5206511b2d84dfb95edc3dae7f54f6cbb9bcca"
105
+ "gitHead": "07ef27d272dd9a067a9648ac7013748510556a18"
106
106
  }