Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
10b4a6d977 | ||
|
9c6b67939a | ||
|
0b95c3951d | ||
|
557e6d9005 | ||
|
c4e1591374 |
20
Docker/Dockerfile
Normal file
20
Docker/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# FROM node:current-slim
|
||||
FROM node:current-alpine
|
||||
ARG VERSION
|
||||
ENV VERSION ${VERSION:-development}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./package*.json /app/
|
||||
|
||||
COPY ./Docker/cronjobs /etc/crontabs/root
|
||||
|
||||
COPY ./app /app/app
|
||||
|
||||
COPY ./libs /app/libs
|
||||
|
||||
COPY ./data /app/data
|
||||
|
||||
RUN npm install
|
||||
|
||||
CMD ["crond", "-f", "-d", "8"]
|
3
Docker/cronjobs
Normal file
3
Docker/cronjobs
Normal file
@ -0,0 +1,3 @@
|
||||
0 * * * * echo "$(date '+%Y-%m-%d_%H%M%S')" 2>&1
|
||||
10 15 * * 2,5 npm run predict 2>&1
|
||||
45 9 * * 3,6 npm run retrieve 2>&1
|
21
Dockerfile
21
Dockerfile
@ -1,21 +0,0 @@
|
||||
FROM node:current-slim
|
||||
ARG VERSION
|
||||
ENV VERSION ${VERSION:-development}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY start.sh package*.json ecosystem.config.json /app/
|
||||
|
||||
COPY ./app/ /app/app
|
||||
|
||||
COPY ./libs/ /app/libs
|
||||
|
||||
COPY ./data/ /app/data
|
||||
|
||||
RUN npm install pm2 -g && npm install
|
||||
|
||||
# RUN ls -lh .
|
||||
|
||||
RUN chmod +x /app/start.sh
|
||||
|
||||
ENTRYPOINT ["/app/start.sh"]
|
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ NO_CACHE = true
|
||||
|
||||
#build docker image
|
||||
build:
|
||||
docker build . -t $(APP_IMAGE) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE) --compress
|
||||
docker build ./Docker/. -t $(APP_IMAGE) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE) --compress
|
||||
.PHONY: build
|
||||
|
||||
#push docker image to registry
|
||||
|
File diff suppressed because one or more lines are too long
1
data_store/data.json
Normal file
1
data_store/data.json
Normal file
File diff suppressed because one or more lines are too long
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: '3.5'
|
||||
|
||||
services:
|
||||
lot:
|
||||
container_name: Lot
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Docker/Dockerfile
|
||||
image: silvrtree-lot
|
||||
volumes:
|
||||
- ./data_store:/app/data
|
3116
package-lock.json
generated
3116
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "node lot.js",
|
||||
"retrieve": "node app.js"
|
||||
"retrieve": "node ./app/retriever.js",
|
||||
"predict" : "node ./app/predict.js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
@ -25,7 +26,7 @@
|
||||
"cheerio": "^1.0.0-rc.2",
|
||||
"fecha": "^4.2.3",
|
||||
"log4js": "^6.4.6",
|
||||
"node-fetch": "^3.2.4",
|
||||
"node-fetch": "^2.3.0",
|
||||
"node-pushover": "^1.0.0",
|
||||
"sugar": "^2.0.1",
|
||||
"sugar-date": "^2.0.0"
|
||||
|
Loading…
Reference in New Issue
Block a user