-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
fibonacci998
commented
Aug 22, 2023
- install hasura-cli in dockerfile
- add env for hasura-cli
- add command to run hasura
…ommand to run hasura
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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;", |
There was a problem hiding this comment.
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ỉ?
There was a problem hiding this comment.
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ó
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
…ate readme for hasura
em thêm readme cho phần này rồi nhé |
Dockerfile
Outdated
@@ -1,4 +1,7 @@ | |||
FROM node:16-alpine | |||
FROM node:16 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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ỉ?
There was a problem hiding this comment.
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é
There was a problem hiding this comment.
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?
9eb5c80
to
8500faf
Compare