File tree Expand file tree Collapse file tree 9 files changed +19
-13
lines changed
Expand file tree Collapse file tree 9 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 7474 uses : bahmutov/npm-install@v1
7575
7676 - name : Deploy to GKE
77- run : nx affected --target=deploy --configuration=production
77+ run : npx nx affected --target=deploy --configuration=production
7878
7979 # cypress-chrome:
8080 # name: 'Cypress - chrome'
Original file line number Diff line number Diff line change 11FROM node:16.13.0-alpine as base
22
3- RUN apk update && apk get git
3+ RUN apk update && apk add git
44
55RUN mkdir /baggers
66WORKDIR /baggers
Original file line number Diff line number Diff line change 1717 - secretRef :
1818 name : api-env
1919 restartPolicy : OnFailure
20- ttlSecondsAfterFinished : 1
Original file line number Diff line number Diff line change @@ -58,5 +58,5 @@ export const initTickers = async (mongo: MongoClient) => {
5858 ...res . result . opTime ,
5959 } ) ;
6060
61- return process . exit ( 0 ) ;
61+ process . exit ( 0 ) ;
6262} ;
Original file line number Diff line number Diff line change 11import { mongoClient } from '@baggers/mongo-client' ;
22import { initTickers } from './init-tickers' ;
33
4- initTickers ( mongoClient ( ) ) ;
4+ initTickers ( mongoClient ( ) ) . catch ( ( e ) => {
5+ console . error ( e ) ;
6+ process . exit ( 1 ) ;
7+ } ) ;
Original file line number Diff line number Diff line change 11apiVersion : batch/v1
22kind : CronJob
33metadata :
4- name : get -ticker-snapshots
4+ name : cron -ticker-snapshots
55spec :
66 # Every 15th minute during market hours
77 schedule : ' */15 14-21 * * 1-5'
@@ -10,11 +10,10 @@ spec:
1010 template :
1111 spec :
1212 containers :
13- - name : get -ticker-snapshots
13+ - name : cron -ticker-snapshots
1414 image : eu.gcr.io/baggers-367917/cron-ticker-snapshots:latest
1515 imagePullPolicy : Always
1616 envFrom :
1717 - secretRef :
1818 name : api-env
1919 restartPolicy : OnFailure
20- ttlSecondsAfterFinished : 1
Original file line number Diff line number Diff line change @@ -101,5 +101,6 @@ export const getTickerSnapshots = async (
101101 totalTimeForJob : ( Date . now ( ) - t ) / 1000 ,
102102 } ) ;
103103
104+ process . exit ( 0 ) ;
104105 // insert tickerSnapshot object for every security and also make sure we have
105106} ;
Original file line number Diff line number Diff line change 11import { mongoClient } from '@baggers/mongo-client' ;
22import { getTickerSnapshots } from './get-ticker-snapshots' ;
33
4- getTickerSnapshots ( mongoClient ( ) ) ;
4+ getTickerSnapshots ( mongoClient ( ) ) . catch ( ( e ) => {
5+ console . error ( e ) ;
6+ process . exit ( 1 ) ;
7+ } ) ;
Original file line number Diff line number Diff line change 1- FROM node:16.13.0-bullseye-slim as base
1+ FROM node:16.13.0-alpine as base
2+
3+ RUN apk update && apk add git
24
3- RUN apt-get update && apt-get install git -y
45
56RUN mkdir /baggers
67WORKDIR /baggers
@@ -24,7 +25,7 @@ COPY --from=ui-build /baggers/dist/apps/ui /baggers-ui/
2425# TODO: generate package.json for remix projects, i think i can update
2526# Nrwl/remix and get this functionality
2627COPY --from=base-deps baggers/package.json /baggers/package-lock.json /baggers-ui/
27- RUN npm ci --only=production
28+ COPY --from=base-deps baggers/node_modules/ /baggers-ui/
2829
2930# TODO: prune dependencies here, its far too slow at the moment as its installing all dependenices again for some reason
30- CMD ["node_modules/.bin/remix-serve " , "build" ]
31+ CMD ["node " , "build/main.js " ]
You can’t perform that action at this time.
0 commit comments