Compare commits
No commits in common. "c9d87ffccb3a9d6a29a05eecb660e09ce7ff2528" and "391e6bf09a70d28ac2847d760e8f45debf5e5127" have entirely different histories.
c9d87ffccb
...
391e6bf09a
@ -1,14 +1,13 @@
|
|||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
* git clone (to //opt for verbatim use of the .service file)
|
* git clone (to //opt for verbatim use of the .service file)
|
||||||
* `npm install`
|
* npm install
|
||||||
* create certs: `chmod 700 create_certs.sh` , `./create_certs.sh`
|
* create certs (`./create_certs.sh`)
|
||||||
* create .env from template .env.sample sepcifiying database creds and listening port for API, and working directory
|
* populate .env from template for database creds and listening port for API, and working directory
|
||||||
* `node index.js`
|
|
||||||
to setup as service
|
|
||||||
* copy .service file to //etc/systemd/system/ (adjust user/working direct if needed)
|
* copy .service file to //etc/systemd/system/ (adjust user/working direct if needed)
|
||||||
* `sudo systemctl enable forecast_api.service`
|
* `sudo systemctl enable forecast_api.service`
|
||||||
|
|
||||||
## Initial Forecast
|
## Initial Forecast
|
||||||
|
|
||||||
* all SQL depends on unchanged core sales matrix table schema
|
* all SQL depends on unchanged core sales matrix table schema
|
||||||
|
* build/build_baseline.sql
|
||||||
|
@ -171,7 +171,7 @@ FROM
|
|||||||
--LIMIT 100
|
--LIMIT 100
|
||||||
) WITH DATA;
|
) WITH DATA;
|
||||||
|
|
||||||
INSERT INTO rlarp.osm_pool SELECT * FROM rlarp.osm_pool_stage;
|
--INSERT INTO rlarp.osm_pool SELECT * FROM rlarp.osm_pool_stage;
|
||||||
|
|
||||||
--CREATE INDEX osm_qr ON rlarp.osm_pool(quota_rep_descr, bill_cust_descr, ship_cust_descr);
|
--CREATE INDEX osm_qr ON rlarp.osm_pool(quota_rep_descr, bill_cust_descr, ship_cust_descr);
|
||||||
--ALTER TABLE rlarp.osm_pool ADD CONSTRAINT logfk FOREIGN KEY (logid) REFERENCES rlarp.osm_log(id);
|
--ALTER TABLE rlarp.osm_pool ADD CONSTRAINT logfk FOREIGN KEY (logid) REFERENCES rlarp.osm_log(id);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#$PG -f ./build_stage.sql;
|
#$PG -f ./build_stage.sql;
|
||||||
$PG -f ./build_rolling.sql;
|
$PG -f ./build_baseline.sql;
|
||||||
$PG -f ./snap_itemm.sql;
|
$PG -f ./snap_itemm.sql;
|
||||||
$PG -f ./snap_cost_current.sql;
|
$PG -f ./snap_cost_current.sql;
|
||||||
$PG -f ./snap_customer.sql;
|
$PG -f ./snap_customer.sql;
|
Loading…
Reference in New Issue
Block a user