Merge branch 'docker-part-2' into 'dev'

Updated docker handling, now with docker-compose file

See merge request martind2000/lot!2
This commit is contained in:
Martin Donnelly 2022-05-13 18:33:07 +00:00
commit 0b95c3951d
10 changed files with 3097 additions and 80 deletions

22
Docker/Dockerfile Normal file
View File

@ -0,0 +1,22 @@
# FROM node:current-slim
FROM node:current-alpine
ARG VERSION
ENV VERSION ${VERSION:-development}
WORKDIR /app
COPY ./Docker/start.sh ./package*.json ./Docker/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"]

View File

@ -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"]

View File

@ -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

File diff suppressed because one or more lines are too long

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: '3.5'
services:
slack:
container_name: Lot
build:
context: .
dockerfile: ./Docker/Dockerfile
image: silvrtree-lot
volumes:
- ./data_store:/app/data

3116
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,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"