Skip to content

Commit 4d8a717

Browse files
authored
Merge pull request #1264 from PokeAPI/gql-v1beta2
v1beta2
2 parents 1d53a0f + abb322c commit 4d8a717

File tree

377 files changed

+6540
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

377 files changed

+6540
-7
lines changed

Makefile

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ veekun_pokedex_repository = ../pokedex
22
local_config = --settings=config.local
33
docker_config = --settings=config.docker-compose
44
gql_compose_config = -f docker-compose.yml -f Resources/compose/docker-compose-prod-graphql.yml
5+
gqlv1beta_compose_config = -f docker-compose.yml -f Resources/compose/docker-compose-prod-graphql.yml -f Resources/compose/docker-compose-prod-graphql-v1beta.yml
56

67
.PHONY: help
78
.SILENT:
@@ -104,11 +105,17 @@ sync-to-veekun: pull pull-veekun # Copy data from this repository to ../pokedex
104105
# read-env-file: # Exports ./.env into shell environment variables
105106
# export `egrep -v '^#' .env | xargs`
106107

108+
hasura-export-v1beta:
109+
hasura md export --project graphql/v1beta
110+
111+
hasura-apply-v1beta:
112+
hasura md apply --project graphql/v1beta
113+
107114
hasura-export: # Export Hasura configuration, be sure to have set HASURA_GRAPHQL_ADMIN_SECRET
108-
hasura md export --project graphql
115+
hasura md export --project graphql/v1beta2
109116

110117
hasura-apply: # Apply local Hasura configuration, be sure to have set HASURA_GRAPHQL_ADMIN_SECRET
111-
hasura md apply --project graphql
118+
hasura md apply --project graphql/v1beta2
112119

113120
hasura-get-anon-schema: # Dumps GraphQL schema
114121
gq http://localhost:8080/v1/graphql --introspect > graphql/schema.graphql
@@ -143,6 +150,23 @@ down-graphql-prod:
143150
docker volume prune --all --force
144151
sync; echo 3 > /proc/sys/vm/drop_caches
145152

153+
update-graphql-v1beta-data-prod:
154+
docker compose ${gqlv1beta_compose_config} stop
155+
git pull origin master
156+
git submodule update --remote --merge
157+
docker compose ${gqlv1beta_compose_config} up --pull always -d app cache db
158+
sync; echo 3 > /proc/sys/vm/drop_caches
159+
make docker-migrate
160+
make docker-build-db
161+
docker compose ${gqlv1beta_compose_config} stop app cache
162+
docker compose ${gqlv1beta_compose_config} up --pull always -d graphql-engine graphiql
163+
sleep 120
164+
make hasura-apply-v1beta
165+
docker compose ${gqlv1beta_compose_config} up --pull always -d web
166+
docker compose exec -T web sh -c 'rm -rf /tmp/cache/*'
167+
docker image prune -af
168+
sync; echo 3 > /proc/sys/vm/drop_caches
169+
146170
# Nginx doesn't start if upstream graphql-engine is down
147171
update-graphql-data-prod:
148172
docker compose ${gql_compose_config} stop
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: '2.4'
2+
services:
3+
graphiql:
4+
image: pokeapi/graphiql:2.0.0

Resources/compose/docker-compose-prod-graphql.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@ services:
3333
HASURA_GRAPHQL_EVENTS_HTTP_POOL_SIZE: 10
3434

3535
graphiql:
36-
image: pokeapi/graphiql:2.0.0
36+
image: pokeapi/graphiql:2.0.1
3737
expose:
3838
- 80
3939
depends_on:
4040
- graphql-engine
4141
restart: always
42-
43-
volumes:
44-
graphiql:

Resources/k8s/kustomize/base/jobs/load-graphql.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ spec:
3838
git clone https://github.com/PokeAPI/pokeapi.git &&
3939
cd pokeapi &&
4040
(git checkout $(POKEAPI_CHECKOUT_REF) || git checkout master) &&
41-
hasura md apply --endpoint http://graphql:8080 --project graphql --admin-secret $(HASURA_GRAPHQL_ADMIN_SECRET)
41+
hasura md apply --endpoint http://graphql:8080 --project graphql/v1beta2 --admin-secret $(HASURA_GRAPHQL_ADMIN_SECRET)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)