From d06399ab54954308285ba87b9ea1ffd321360397 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Fri, 26 Jan 2024 10:35:55 +0700 Subject: [PATCH 01/14] Refactor useQueryStore in queries.ts --- src/stores/queries.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/stores/queries.ts b/src/stores/queries.ts index 6c46a26..09d0e5d 100644 --- a/src/stores/queries.ts +++ b/src/stores/queries.ts @@ -4,7 +4,7 @@ import gql from 'graphql-tag' import { useQuery } from '@apollo/client' export const useQueryStore = defineStore('query', () => { - const getUser = useQuery(gql` + const getUser = useQuery(gql` query getUsers { users { id @@ -15,7 +15,20 @@ export const useQueryStore = defineStore('query', () => { } `) - return { - getUser, + const { variables } = useQuery(gql` + query getUserById ($id: ID!) { + user (id: $id) { + id + email + } } + `, { + variables: { + id: 'abc-abc-abc', + } + }) + + return { + getUser, + } }) \ No newline at end of file From 25c67884741fc73957dd8b21942443a082c3f24a Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Fri, 26 Jan 2024 10:37:38 +0700 Subject: [PATCH 02/14] Update Docker image tags to v1.0.0 for development and release --- .github/workflows/docker-image-development.yml | 4 ++-- .github/workflows/docker-image-release.yml | 4 ++-- deployment.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-image-development.yml b/.github/workflows/docker-image-development.yml index 7a54305..44febf6 100644 --- a/.github/workflows/docker-image-development.yml +++ b/.github/workflows/docker-image-development.yml @@ -24,5 +24,5 @@ jobs: - uses: actions/checkout@v3 - name: Build the Docker image run: | - docker build . -t defuj/apkt-eis:v0.0.${{ github.run_number }}-dev - docker push defuj/apkt-eis:v0.0.${{ github.run_number }}-dev \ No newline at end of file + docker build . -t defuj/apkt-eis:v1.0.0-dev + docker push defuj/apkt-eis:v1.0.0-dev \ No newline at end of file diff --git a/.github/workflows/docker-image-release.yml b/.github/workflows/docker-image-release.yml index e4bd088..6fd001d 100644 --- a/.github/workflows/docker-image-release.yml +++ b/.github/workflows/docker-image-release.yml @@ -24,7 +24,7 @@ jobs: - name: Build the Docker image run: | docker build . -t defuj/apkt-eis - docker image tag defuj/apkt-eis defuj/apkt-eis:v1.0.${{ github.run_number }}-release - docker push defuj/apkt-eis:v1.0.${{ github.run_number }}-release + docker image tag defuj/apkt-eis defuj/apkt-eis:v1.0.0-release + docker push defuj/apkt-eis:v1.0.0-release diff --git a/deployment.yaml b/deployment.yaml index 9961639..6ce6f13 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: apkt-eis - image: defuj/apkt-eis:v0.0.22-dev + image: defuj/apkt-eis:v1.0.0-dev ports: - containerPort: 80 --- From 56833703a9ab580097d6dc2d8892c7c579e38836 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Fri, 26 Jan 2024 10:38:16 +0700 Subject: [PATCH 03/14] build image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 32ff3f3..2935857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,4 @@ FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf EXPOSE 32166 -CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file +CMD ["nginx", "-g", "daemon off;"] From 92c6c51c35a2465501df698845a3b09be728c6c7 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Fri, 26 Jan 2024 10:39:22 +0700 Subject: [PATCH 04/14] build image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2935857..32ff3f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,4 @@ FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf EXPOSE 32166 -CMD ["nginx", "-g", "daemon off;"] +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file From 18b29e7e46cff767704e93332ef7c324e03f10cb Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Fri, 16 Feb 2024 10:01:41 +0700 Subject: [PATCH 05/14] Add manifest.yaml file for Docker configuration --- manifest.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 manifest.yaml diff --git a/manifest.yaml b/manifest.yaml new file mode 100644 index 0000000..b2af34f --- /dev/null +++ b/manifest.yaml @@ -0,0 +1,10 @@ +version: '3.8' + +services: + apkt-eis: + build: + context: . + dockerfile: Dockerfile + ports: + - "32166:80" + restart: always \ No newline at end of file From 99595e869d1d40a37941de963f1bf3f162ebd2d2 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Fri, 16 Feb 2024 10:21:44 +0700 Subject: [PATCH 06/14] Update Dockerfile and manifest.yaml to expose port 32190 --- Dockerfile | 3 ++- manifest.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32ff3f3..fde6d96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,6 @@ RUN npm run build FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf -EXPOSE 32166 +# EXPOSE 32166 +EXPOSE 32190 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/manifest.yaml b/manifest.yaml index b2af34f..c3c0249 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -6,5 +6,5 @@ services: context: . dockerfile: Dockerfile ports: - - "32166:80" + - "32190:80" restart: always \ No newline at end of file From 10d412a21c1ce5cad54b77a5f4eca6252e15909d Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Fri, 16 Feb 2024 10:32:49 +0700 Subject: [PATCH 07/14] Update Dockerfile and manifest.yaml --- Dockerfile | 3 +-- manifest.yaml | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 manifest.yaml diff --git a/Dockerfile b/Dockerfile index fde6d96..32ff3f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,5 @@ RUN npm run build FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf -# EXPOSE 32166 -EXPOSE 32190 +EXPOSE 32166 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/manifest.yaml b/manifest.yaml deleted file mode 100644 index c3c0249..0000000 --- a/manifest.yaml +++ /dev/null @@ -1,10 +0,0 @@ -version: '3.8' - -services: - apkt-eis: - build: - context: . - dockerfile: Dockerfile - ports: - - "32190:80" - restart: always \ No newline at end of file From a0d178e1d1baf7ad1c471f428c03124355b5a8d9 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Mon, 19 Feb 2024 08:32:35 +0700 Subject: [PATCH 08/14] build image --- .github/workflows/docker-image-development.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image-development.yml b/.github/workflows/docker-image-development.yml index ad571d8..d72aba9 100644 --- a/.github/workflows/docker-image-development.yml +++ b/.github/workflows/docker-image-development.yml @@ -24,5 +24,5 @@ jobs: - uses: actions/checkout@v3 - name: Build the Docker image run: | - docker build . -t defuj/apkt-eis:v1.0.1-dev - docker push defuj/apkt-eis:v1.0.1-dev \ No newline at end of file + docker build . -t defuj/apkt-eis:v0.0.22-dev + docker push defuj/apkt-eis:v0.0.22-dev \ No newline at end of file From 181f0c2cb3583af99499ce8a49f99f9ca067174f Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Mon, 19 Feb 2024 09:12:02 +0700 Subject: [PATCH 09/14] build image --- .github/workflows/docker-image-development.yml | 4 ++-- deployment.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image-development.yml b/.github/workflows/docker-image-development.yml index d72aba9..90f9314 100755 --- a/.github/workflows/docker-image-development.yml +++ b/.github/workflows/docker-image-development.yml @@ -24,5 +24,5 @@ jobs: - uses: actions/checkout@v3 - name: Build the Docker image run: | - docker build . -t defuj/apkt-eis:v0.0.22-dev - docker push defuj/apkt-eis:v0.0.22-dev \ No newline at end of file + docker build . -t defuj/apkt-eis:v0.0.23-dev + docker push defuj/apkt-eis:v0.0.23-dev \ No newline at end of file diff --git a/deployment.yaml b/deployment.yaml index 9961639..40758f8 100755 --- a/deployment.yaml +++ b/deployment.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: apkt-eis - image: defuj/apkt-eis:v0.0.22-dev + image: defuj/apkt-eis:v0.0.23-dev ports: - containerPort: 80 --- From e2e6dd133e296081e60c02245f793016a974f080 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Mon, 19 Feb 2024 09:15:34 +0700 Subject: [PATCH 10/14] build image --- deployment.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 40758f8..8319df0 100755 --- a/deployment.yaml +++ b/deployment.yaml @@ -43,4 +43,5 @@ spec: - protocol: TCP port: 32166 targetPort: 80 - type: ClusterIP \ No newline at end of file + type: ClusterIP + \ No newline at end of file From 045636a4844f0d5b6c25d5f20e4888e2aece1f3a Mon Sep 17 00:00:00 2001 From: rpurnama1409 Date: Mon, 19 Feb 2024 10:59:49 +0700 Subject: [PATCH 11/14] build image --- .github/workflows/docker-image-development.yml | 4 ++-- src/utils/graphql.ts | 2 +- src/utils/network.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image-development.yml b/.github/workflows/docker-image-development.yml index 90f9314..c7f065c 100755 --- a/.github/workflows/docker-image-development.yml +++ b/.github/workflows/docker-image-development.yml @@ -24,5 +24,5 @@ jobs: - uses: actions/checkout@v3 - name: Build the Docker image run: | - docker build . -t defuj/apkt-eis:v0.0.23-dev - docker push defuj/apkt-eis:v0.0.23-dev \ No newline at end of file + docker build . -t defuj/apkt-eis:v0.0.24-dev + docker push defuj/apkt-eis:v0.0.24-dev \ No newline at end of file diff --git a/src/utils/graphql.ts b/src/utils/graphql.ts index c0ec287..737360b 100755 --- a/src/utils/graphql.ts +++ b/src/utils/graphql.ts @@ -3,7 +3,7 @@ import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client/core export const apolloClient = () => { const httpLink = createHttpLink({ - uri: 'http://10.8.0.13:32169/graphql', + uri: 'http://http://192.168.1.84:32180/graphql', credentials: 'include', // Include credentials for cross-origin requests }); diff --git a/src/utils/network.ts b/src/utils/network.ts index 47dc6df..36e42a7 100755 --- a/src/utils/network.ts +++ b/src/utils/network.ts @@ -1,7 +1,7 @@ import axios from 'axios' const instance = axios.create({ - baseURL: 'http://192.168.1.84/:32180' + baseURL: 'http://192.168.1.84:32181' }) const getUid = async () => await instance.get('/uid') From 8ca65ad1722a50e6d306a5a017b83903677e7c98 Mon Sep 17 00:00:00 2001 From: rpurnama1409 Date: Mon, 19 Feb 2024 12:00:35 +0700 Subject: [PATCH 12/14] Fix GraphQL URI in apolloClient function --- src/utils/graphql.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/graphql.ts b/src/utils/graphql.ts index 737360b..bd67d3d 100755 --- a/src/utils/graphql.ts +++ b/src/utils/graphql.ts @@ -3,7 +3,7 @@ import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client/core export const apolloClient = () => { const httpLink = createHttpLink({ - uri: 'http://http://192.168.1.84:32180/graphql', + uri: 'http://192.168.1.84:32180/graphql', credentials: 'include', // Include credentials for cross-origin requests }); From e58c94244b0237cb5516125d9a6a5ba3440390c0 Mon Sep 17 00:00:00 2001 From: rpurnama1409 Date: Mon, 19 Feb 2024 12:01:04 +0700 Subject: [PATCH 13/14] build image --- src/utils/graphql.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/graphql.ts b/src/utils/graphql.ts index bd67d3d..e180451 100755 --- a/src/utils/graphql.ts +++ b/src/utils/graphql.ts @@ -3,7 +3,7 @@ import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client/core export const apolloClient = () => { const httpLink = createHttpLink({ - uri: 'http://192.168.1.84:32180/graphql', + uri: 'http://192.168.1.84:32180/graphql', //api dev server credentials: 'include', // Include credentials for cross-origin requests }); From a2aea3f1ffb99fb8319e8dc820853a7e84804e52 Mon Sep 17 00:00:00 2001 From: rpurnama1409 Date: Mon, 19 Feb 2024 12:05:37 +0700 Subject: [PATCH 14/14] build image --- .../workflows/docker-image-development.yml | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker-image-development.yml b/.github/workflows/docker-image-development.yml index c7f065c..8076f21 100755 --- a/.github/workflows/docker-image-development.yml +++ b/.github/workflows/docker-image-development.yml @@ -2,27 +2,24 @@ name: Publish Docker Image Development on: push: - branches: [ "development" ] + branches: ['development'] pull_request: - branches: [ "development" ] + branches: ['development'] jobs: - build: - runs-on: ubuntu-latest if: ${{github.event.head_commit.message}} == *'build image'* steps: - - - name: Docker Hub Login - env: + - name: Docker Hub Login + env: DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - - uses: actions/checkout@v3 - - name: Build the Docker image - run: | - docker build . -t defuj/apkt-eis:v0.0.24-dev - docker push defuj/apkt-eis:v0.0.24-dev \ No newline at end of file + - uses: actions/checkout@v3 + - name: Build the Docker image + run: | + docker build . -t defuj/apkt-eis:v0.0.25-dev + docker push defuj/apkt-eis:v0.0.25-dev