Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: manage hasura metadata #335

Closed
wants to merge 35 commits into from
Closed

Conversation

fibonacci998
Copy link
Member

  • install hasura-cli in dockerfile
  • add env for hasura-cli
  • add command to run hasura

@fibonacci998 fibonacci998 requested a review from peara August 22, 2023 03:06
Copy link
Member

@peara peara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

em thêm hướng dẫn sử dụng đi

Dockerfile Outdated
@@ -12,6 +12,9 @@ RUN npm install && rm .npmrc
# Copy source
COPY . .

## Install hasura cli
RUN apk update && apk add bash curl && curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

có khi tự lấy 1 cái docker về build sẵn để đấy? cài lại cũng hơi dở
hoặc em cho nó lê trc đoạn cài node?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

package.json Outdated
@@ -27,7 +27,10 @@
"test-ci": "yarn jest --verbose --runInBand --forceExit",
"test-watch": "yarn jest --watch",
"test-coverage": "yarn jest --coverage",
"lint": "echo 'Running lint for repository' && eslint ."
"lint": "echo 'Running lint for repository' && eslint .",
"hasura:metadata:export": "touch config.yaml; hasura metadata export;rm config.yaml;",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sao phải touch rồi remove nhỉ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasura cli nó bắt có file config.yaml dù em đã thêm --envfile trong command của nó

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nếu vậy thì em tạo 1 folder hasura rồi chạy hasura init ở đó đi, mấy cái lệnh này cho cd vào folder đó chạy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anh vừa thử hasura init thì nó bảo tạo folder hasura luôn, rồi vào đó chạy tiếp

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

em bỏ hết mấy lệnh viết thêm trong package.json rồi, dùng luôn command hasura cho tiện vậy

@fibonacci998
Copy link
Member Author

em thêm hướng dẫn sử dụng đi

em thêm readme cho phần này rồi nhé

@fibonacci998 fibonacci998 requested a review from peara August 23, 2023 03:10
Dockerfile Outdated
@@ -1,4 +1,7 @@
FROM node:16-alpine
FROM node:16
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chỗ này để alpine ko chạy được à?
vậy nên tạo 1 image riêng cho cái hasura này thôi

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dùng image nào cho nhẹ anh nhỉ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

em tạo cho hasura 1 dockerfile dùng node16 rồi nhé

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ơ mà cách này thì lúc nào chạy docker build cũng phải build lại cả 2 image rồi push lên hả anh?

@fibonacci998 fibonacci998 force-pushed the feat/create-hasura-metadata branch from 9eb5c80 to 8500faf Compare September 6, 2023 06:41
@fibonacci998 fibonacci998 requested a review from peara September 6, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants