Skip to content

Commit 5e10626

Browse files
committed
chore: fix build
1 parent 696159b commit 5e10626

File tree

9 files changed

+19
-13
lines changed

9 files changed

+19
-13
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
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'

apps/api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM node:16.13.0-alpine as base
22

3-
RUN apk update && apk get git
3+
RUN apk update && apk add git
44

55
RUN mkdir /baggers
66
WORKDIR /baggers

apps/cron-init-tickers/kubernetes/prod/cron.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ spec:
1717
- secretRef:
1818
name: api-env
1919
restartPolicy: OnFailure
20-
ttlSecondsAfterFinished: 1

apps/cron-init-tickers/src/init-tickers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
};

apps/cron-init-tickers/src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { mongoClient } from '@baggers/mongo-client';
22
import { initTickers } from './init-tickers';
33

4-
initTickers(mongoClient());
4+
initTickers(mongoClient()).catch((e) => {
5+
console.error(e);
6+
process.exit(1);
7+
});
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: batch/v1
22
kind: CronJob
33
metadata:
4-
name: get-ticker-snapshots
4+
name: cron-ticker-snapshots
55
spec:
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

apps/cron-ticker-snapshots/src/get-ticker-snapshots.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
};
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { mongoClient } from '@baggers/mongo-client';
22
import { getTickerSnapshots } from './get-ticker-snapshots';
33

4-
getTickerSnapshots(mongoClient());
4+
getTickerSnapshots(mongoClient()).catch((e) => {
5+
console.error(e);
6+
process.exit(1);
7+
});

apps/ui/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
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

56
RUN mkdir /baggers
67
WORKDIR /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
2627
COPY --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"]

0 commit comments

Comments
 (0)