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
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
704da28
feat: install hasura-cli in dockerfile, add env for hasura-cli, add c…
fibonacci998 Aug 22, 2023
b66275e
fix: create new .env.hasura; update install hasura in dockerfile; upd…
fibonacci998 Aug 23, 2023
60e0baa
feat: remove command run hasura through npm, update README use hasura
fibonacci998 Aug 23, 2023
9a37c6a
fix: remove env not used
fibonacci998 Aug 23, 2023
81deb1d
fix: change Dockerfile to node:16 (hasura cli cannot used with node:1…
fibonacci998 Aug 28, 2023
6ff5c72
feat: create dockerfile for hasura-cli
fibonacci998 Sep 5, 2023
32535c4
feat: create ci to build hasura
fibonacci998 Sep 6, 2023
8500faf
feat: update ci for hasura
fibonacci998 Sep 6, 2023
748c238
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
53af8e0
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
ecfa8bb
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
23927ff
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
2c4ac4e
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
a6a57bd
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
1a5a93f
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
6694b86
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
7976d21
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
a548a50
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
b997f15
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
6d66a03
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
75dc2a7
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
345d841
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
6619399
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
9dc6fd1
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
3a17f37
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
ff8a1f2
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
cd97ae8
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
d006a96
fix: update ci for hasura build
fibonacci998 Sep 6, 2023
c1752e1
feat: create empty hasura directory
fibonacci998 Sep 6, 2023
d2b812f
fix: remove test branch in ci
fibonacci998 Sep 6, 2023
ae2832d
feat: add dockerfile.hasura to ci
fibonacci998 Sep 6, 2023
ed9e30f
fix: update workdir in dockerfile.hasura
fibonacci998 Sep 6, 2023
ca877d1
feat: update gitops after build hasura
fibonacci998 Sep 19, 2023
3e19a04
fix: add condition to run update manifest hasura
fibonacci998 Sep 19, 2023
c14d7c8
fix: set output to job build-hasura-metadata
fibonacci998 Sep 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,10 @@ S3_GATEWAY=
HASURA_SECRET=
HASURA_JWT=

ADD_INTER_NAMESPACE_MIDDLEWARE=false
ADD_INTER_NAMESPACE_MIDDLEWARE=false

# Use for hasura cli
HASURA_GRAPHQL_VERSION=3
HASURA_GRAPHQL_ENDPOINT=
HASURA_GRAPHQL_ADMIN_SECRET=
HASURA_GRAPHQL_METADATA_DIRECTORY=hasura/metadata
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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


# Build and cleanup
ENV NODE_ENV=production
RUN npm run build
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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

"hasura:metadata:diff": "touch config.yaml; hasura metadata diff;rm config.yaml;",
"hasura:metadata:apply": "touch config.yaml; hasura metadata apply;rm config.yaml;"
},
"nodemonConfig": {
"ignore": [
Expand Down