parser update, non-restart - node cron

This commit is contained in:
Anthony Mineo 2020-09-23 10:57:09 -04:00
parent ef3909b8ac
commit 67eb8db0c8
5 changed files with 9 additions and 7644 deletions

File diff suppressed because it is too large Load diff

View file

@ -5,5 +5,6 @@ echo "T2 Stat Parser Running...";
# Run this initially, then we'll execute this on a schedule # Run this initially, then we'll execute this on a schedule
./start.sh ./start.sh
echo "T2 Stat Parser Done!";
# Keep container running with the cron schedule # Keep container running with the cron schedule
crond -l 2 -f #crond -l 2 -f

View file

@ -12,6 +12,7 @@ ENV NODE_ENV=production
RUN nest build RUN nest build
# ============================ # ============================
# ============================ # ============================

View file

@ -29,8 +29,8 @@ RUN apk update && apk add --no-cache wget tzdata
#Set TimeZone #Set TimeZone
ENV TZ=America/New_York ENV TZ=America/New_York
#Set cron schedule (every day at 11:30am est) # #Set cron schedule (every day at 11:30am est)
RUN echo '30 11 * * * /app/start.sh' > /etc/crontabs/root # RUN echo '30 11 * * * /app/start.sh' > /etc/crontabs/root
WORKDIR /app WORKDIR /app
@ -38,4 +38,5 @@ COPY --from=builder /app/main /app/main
COPY ./app/t2-stat-parser/start.sh /app/start.sh COPY ./app/t2-stat-parser/start.sh /app/start.sh
COPY ./app/t2-stat-parser/parser-daemon.sh /app/parser-daemon.sh COPY ./app/t2-stat-parser/parser-daemon.sh /app/parser-daemon.sh
ENTRYPOINT ./parser-daemon.sh #ENTRYPOINT ./parser-daemon.sh
ENTRYPOINT ./start.sh

View file

@ -24,7 +24,7 @@ services:
constraints: [node.role == manager] constraints: [node.role == manager]
parser: parser:
image: "amineo/t2-stats-parser:v0.2.0" image: "amineo/t2-stats-parser:v0.3.0"
build: build:
context: . context: .
dockerfile: ./build/go-t2-stat-parser/Dockerfile dockerfile: ./build/go-t2-stat-parser/Dockerfile
@ -44,7 +44,7 @@ services:
replicas: 1 replicas: 1
api: api:
image: "amineo/t2-stats-api:v0.0.7" image: "amineo/t2-stats-api:v0.0.10"
build: build:
context: . context: .
dockerfile: ./build/api/Dockerfile dockerfile: ./build/api/Dockerfile