From ed920881e157ccb81a49576f0208528afa2b9327 Mon Sep 17 00:00:00 2001 From: ikethecoder Date: Mon, 18 Dec 2023 13:39:27 -0800 Subject: [PATCH] fix feeder docker image --- .github/workflows/ci-build-deploy.yaml | 3 ++- feeds/Dockerfile | 6 +++--- feeds/index.js | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-build-deploy.yaml b/.github/workflows/ci-build-deploy.yaml index 715e3c5d6..af04a4d83 100644 --- a/.github/workflows/ci-build-deploy.yaml +++ b/.github/workflows/ci-build-deploy.yaml @@ -312,7 +312,7 @@ jobs: - 'state=\$(curl -XGET -m 2 --silent -f -H \"Accept: application/json\" http://localhost:3000/health | jq -r \".status | ascii_downcase\"); if [ ! \"\$state\" == \"ready\" ]; then exit 1; fi' timeoutSeconds: 3 periodSeconds: 10 - + " > values.yaml helm repo add bcgov http://bcgov.github.io/helm-charts @@ -361,6 +361,7 @@ jobs: if: github.ref == 'refs/heads/test' run: | oc rollout restart deployment/bcgov-aps-portal-generic-api -n ${{ secrets.OPENSHIFT_GOLD_TEST_NAMESPACE }} + oc rollout restart deployment/bcgov-aps-portal-batch-generic-api -n ${{ secrets.OPENSHIFT_GOLD_TEST_NAMESPACE }} - name: 'Create Pull Request for Release' if: github.ref == 'refs/heads/test' diff --git a/feeds/Dockerfile b/feeds/Dockerfile index 20cf0b6f7..0fab49d48 100644 --- a/feeds/Dockerfile +++ b/feeds/Dockerfile @@ -1,4 +1,5 @@ -FROM node:lts-alpine3.17 +#FROM node:lts-alpine3.17 +FROM node:16.14.2-alpine3.15 RUN apk add curl jq @@ -18,5 +19,4 @@ COPY --chown=node . ./ ENV HOME=/home/node -ENTRYPOINT [ "npm", "run" ] -CMD [ "start"] +CMD [ "node", "index.js" ] diff --git a/feeds/index.js b/feeds/index.js index 7b619e444..9f1e78975 100644 --- a/feeds/index.js +++ b/feeds/index.js @@ -171,12 +171,12 @@ if (process.env.SCHEDULE == 'true') { runTimedJob('prometheus', 120, { numDays: 1 }); runTimedJob('prometheus', 24 * 60 + 5, { numDays: 5 }); runTimedJob('kong', 1 * 60, {}); - runTimedJob('ckan', (24 * 60) + 30, {}); + runTimedJob('ckan', 24 * 60 + 30, {}); runTimedJob('ckan_org', 24 * 60, {}); } -const server = app.listen(port, () => { +app.listen(port, () => { logger.info(`Listening at http://localhost:${port}`); }); -process.on('SIGINT', () => process.kill(process.pid, 'SIGTERM')); +process.on('SIGINT', () => process.exit(0));