Skip to content

Commit 90b09ef

Browse files
committed
DOCKER TEST
1 parent c6f8299 commit 90b09ef

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

Dockerfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
FROM node:18-alpine as builder
2-
WORKDIR /app
3-
COPY indexer yarn.lock ./
4-
RUN rm -rf node_modules && yarn install --frozen-lockfile
5-
RUN npx graphql-codegen
6-
RUN yarn build
7-
81
FROM node:18-alpine
2+
93
WORKDIR /app
10-
COPY indexer/package.json yarn.lock ./
4+
5+
COPY package.json .
116
RUN yarn install --frozen-lockfile
12-
COPY --from=builder /app/dist ./dist
13-
COPY --from=builder /app/src/config/global-bundle.pem ./dist/config/global-bundle.pem
14-
COPY --from=builder /app/src/kadena-server/config/schema.graphql ./dist/kadena-server/config/schema.graphql
7+
RUN yarn global add ts-node dotenv-cli
8+
9+
COPY . .
10+
1511
EXPOSE 3001
1612

17-
CMD ["node", "dist/index.js", "--graphql"]
13+
CMD ["yarn", "dev"]

indexer/src/config/init.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ export async function initializeDatabase(noTrigger = true): Promise<void> {
1616
SELECT EXISTS (
1717
SELECT 1 FROM pg_catalog.pg_class c
1818
JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
19-
WHERE c.relname = 'SequelizeMeta' AND n.nspname = 'public'
19+
WHERE c.relname = 'Guards' AND n.nspname = 'public'
2020
)
2121
`,
2222
{ type: QueryTypes.SELECT },
2323
);
2424

25+
console.log(row);
2526
if (row?.exists) {
2627
console.log("Creation skipped.");
2728
return;

0 commit comments

Comments
 (0)