Skip to content

Commit e74795a

Browse files
authored
Merge branch 'master' into poltchageist-form-names
2 parents 61c05b8 + e6f3a8a commit e74795a

File tree

164 files changed

+3681
-3640
lines changed

Some content is hidden

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

164 files changed

+3681
-3640
lines changed

Makefile

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
veekun_pokedex_repository = ../pokedex
22
local_config = --settings=config.local
33
docker_config = --settings=config.docker-compose
4-
HASURA_GRAPHQL_ADMIN_SECRET=pokemon
54

65
.PHONY: help
76
.SILENT:
@@ -101,11 +100,11 @@ sync-to-veekun: pull pull-veekun # Copy data from this repository to ../pokedex
101100
# read-env-file: # Exports ./.env into shell environment variables
102101
# export `egrep -v '^#' .env | xargs`
103102

104-
hasura-export: # Export Hasura configuration
105-
hasura md export --project graphql --admin-secret ${HASURA_GRAPHQL_ADMIN_SECRET}
103+
hasura-export: # Export Hasura configuration, be sure to have set HASURA_GRAPHQL_ADMIN_SECRET
104+
hasura md export --project graphql
106105

107-
hasura-apply: # Apply local Hasura configuration
108-
hasura md apply --project graphql --admin-secret ${HASURA_GRAPHQL_ADMIN_SECRET}
106+
hasura-apply: # Apply local Hasura configuration, be sure to have set HASURA_GRAPHQL_ADMIN_SECRET
107+
hasura md apply --project graphql
109108

110109
hasura-get-anon-schema: # Dumps GraphQL schema
111110
gq http://localhost:8080/v1/graphql --introspect > graphql/schema.graphql
@@ -128,17 +127,25 @@ k8s-delete: # (k8s) Delete pokeapi namespace
128127
start-graphql-prod:
129128
git pull origin master
130129
git submodule update --init
131-
docker-compose -f docker-compose.yml -f docker-compose.override.yml -f Resources/compose/docker-compose-prod-graphql.yml up -d
130+
docker compose -f docker-compose.yml -f Resources/compose/docker-compose-prod-graphql.yml up -d
131+
docker compose stop app
132+
133+
down-graphql-prod:
134+
docker container rm $(docker container ls -aq) -f
135+
docker system prune --all --volumes --force
136+
sync; echo 3 > /proc/sys/vm/drop_caches
132137

133138
update-graphql-data-prod:
134139
git pull origin master
135140
git submodule update --init
136-
docker stop pokeapi_graphql-engine_1
141+
docker compose stop graphql-engine
137142
sync; echo 3 > /proc/sys/vm/drop_caches
138-
docker-compose -f docker-compose.yml -f docker-compose.override.yml -f Resources/compose/docker-compose-prod-graphql.yml up -d app
143+
docker compose -f docker-compose.yml -f Resources/compose/docker-compose-prod-graphql.yml up -d app
139144
make docker-migrate
140145
make docker-build-db
141-
docker stop pokeapi_app_1
146+
docker compose stop app
142147
sync; echo 3 > /proc/sys/vm/drop_caches
143-
docker exec pokeapi_web_1 sh -c 'rm -rf /tmp/cache/*'
144-
docker start pokeapi_graphql-engine_1
148+
docker compose exec -T web sh -c 'rm -rf /tmp/cache/*'
149+
docker compose start graphql-engine
150+
sleep 30
151+
make hasura-apply

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ When you start PokéAPI with the above docker-compose setup, an [Hasura Engine](
8787

8888
```sh
8989
# hasura cli needs to be installed and available in your $PATH: https://hasura.io/docs/latest/graphql/core/hasura-cli/install-hasura-cli.html
90-
# hasura cli's version has to be v2.0.8
90+
# hasura cli's version has to greater than v2.0.8
9191
make hasura-apply
9292
```
9393

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
version: '2.4'
22
services:
3-
cache:
4-
image: redis:7.0.7-alpine
53
db:
6-
image: postgres:15.1
74
environment:
85
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
96
POSTGRES_USER: "${POSTGRES_USER}"
@@ -14,12 +11,10 @@ services:
1411
restart: "no"
1512

1613
web:
17-
image: nginx:1.23.3-alpine
1814
volumes:
1915
- graphiql:/public-console:ro
2016

2117
graphql-engine:
22-
image: hasura/graphql-engine:v2.16.1
2318
cpus: 0.7
2419
memswap_limit: 3g
2520
mem_limit: 700m

Resources/nginx/nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ http {
8989
}
9090

9191
location /graphql/v1beta {
92+
include /ssl/cache.conf*;
9293
# proxy_cache small;
9394
# proxy_cache_valid 200 10d;
9495
# proxy_cache_valid any 0;

data/v2/csv/move_names.csv

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8499,10 +8499,26 @@ move_id,local_language_id,name
84998499
874,8,Corsa all'Oro
85008500
874,9,Make It Rain
85018501
874,11,ゴールドラッシュ
8502-
875,8,Botta
8502+
875,1,サイコブレイド
8503+
875,3,사이코블레이드
8504+
875,4,精神劍
8505+
875,5,Lame Psychique
8506+
875,6,Psychoschneide
8507+
875,7,Psicohojas
8508+
875,8,Psicolama
85038509
875,9,Psyblade
8504-
876,8,Botta
8510+
875,11,サイコブレイド
8511+
875,12,精神剑
8512+
876,1,ハイドロスチーム
8513+
876,3,하이드로스팀
8514+
876,4,水蒸氣
8515+
876,5,Hydrovapeur
8516+
876,6,Hydrodampf
8517+
876,7,Hidrovapor
8518+
876,8,Idrovapore
85058519
876,9,Hydro Steam
8520+
876,11,ハイドロスチーム
8521+
876,12,水蒸气
85068522
877,1,カタストロフィ
85078523
877,4,大灾难
85088524
877,8,Catastrofe

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
version: '2.4'
22
services:
33
cache:
4-
image: redis:7.0.7-alpine
4+
image: redis:7.2.3-alpine
55
volumes:
66
- redis_data:/data
77
restart: always
88

99
db:
10-
image: postgres:15.1
10+
image: postgres:16.1
1111
environment:
1212
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-pokemon}
1313
POSTGRES_USER: ${POSTGRES_USER:-ash}
@@ -33,7 +33,7 @@ services:
3333
restart: always
3434

3535
web:
36-
image: nginx:1.23.3-alpine
36+
image: nginx:1.25.3-alpine
3737
ports:
3838
- "80:80"
3939
- "443:443"
@@ -44,7 +44,7 @@ services:
4444
- ./Resources/nginx/ssl:/ssl:ro
4545
- graphql_cache:/tmp/cache
4646
graphql-engine:
47-
image: hasura/graphql-engine:v2.16.1
47+
image: hasura/graphql-engine:v2.36.1-ce
4848
ports:
4949
- "8080:8080"
5050
depends_on:

graphql/metadata/api_limits.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

graphql/metadata/databases/default/tables/public_pokemon_v2_ability.yaml

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,56 @@ table:
22
name: pokemon_v2_ability
33
schema: public
44
object_relationships:
5-
- name: pokemon_v2_generation
6-
using:
7-
foreign_key_constraint_on: generation_id
5+
- name: pokemon_v2_generation
6+
using:
7+
foreign_key_constraint_on: generation_id
88
array_relationships:
9-
- name: pokemon_v2_abilitychanges
10-
using:
11-
foreign_key_constraint_on:
12-
column: ability_id
13-
table:
14-
name: pokemon_v2_abilitychange
15-
schema: public
16-
- name: pokemon_v2_abilityeffecttexts
17-
using:
18-
foreign_key_constraint_on:
19-
column: ability_id
20-
table:
21-
name: pokemon_v2_abilityeffecttext
22-
schema: public
23-
- name: pokemon_v2_abilityflavortexts
24-
using:
25-
foreign_key_constraint_on:
26-
column: ability_id
27-
table:
28-
name: pokemon_v2_abilityflavortext
29-
schema: public
30-
- name: pokemon_v2_abilitynames
31-
using:
32-
foreign_key_constraint_on:
33-
column: ability_id
34-
table:
35-
name: pokemon_v2_abilityname
36-
schema: public
37-
- name: pokemon_v2_pokemonabilities
38-
using:
39-
foreign_key_constraint_on:
40-
column: ability_id
41-
table:
42-
name: pokemon_v2_pokemonability
43-
schema: public
44-
- name: pokemon_v2_pokemonabilitypasts
45-
using:
46-
foreign_key_constraint_on:
47-
column: ability_id
48-
table:
49-
name: pokemon_v2_pokemonabilitypast
50-
schema: public
9+
- name: pokemon_v2_abilitychanges
10+
using:
11+
foreign_key_constraint_on:
12+
column: ability_id
13+
table:
14+
name: pokemon_v2_abilitychange
15+
schema: public
16+
- name: pokemon_v2_abilityeffecttexts
17+
using:
18+
foreign_key_constraint_on:
19+
column: ability_id
20+
table:
21+
name: pokemon_v2_abilityeffecttext
22+
schema: public
23+
- name: pokemon_v2_abilityflavortexts
24+
using:
25+
foreign_key_constraint_on:
26+
column: ability_id
27+
table:
28+
name: pokemon_v2_abilityflavortext
29+
schema: public
30+
- name: pokemon_v2_abilitynames
31+
using:
32+
foreign_key_constraint_on:
33+
column: ability_id
34+
table:
35+
name: pokemon_v2_abilityname
36+
schema: public
37+
- name: pokemon_v2_pokemonabilities
38+
using:
39+
foreign_key_constraint_on:
40+
column: ability_id
41+
table:
42+
name: pokemon_v2_pokemonability
43+
schema: public
44+
- name: pokemon_v2_pokemonabilitypasts
45+
using:
46+
foreign_key_constraint_on:
47+
column: ability_id
48+
table:
49+
name: pokemon_v2_pokemonabilitypast
50+
schema: public
5151
select_permissions:
52-
- permission:
53-
allow_aggregations: true
54-
columns: "*"
55-
filter: {}
56-
limit: 100000
57-
role: anon
52+
- role: anon
53+
permission:
54+
columns: '*'
55+
filter: {}
56+
limit: 100000
57+
allow_aggregations: true

graphql/metadata/databases/default/tables/public_pokemon_v2_abilitychange.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ table:
22
name: pokemon_v2_abilitychange
33
schema: public
44
object_relationships:
5-
- name: pokemon_v2_ability
6-
using:
7-
foreign_key_constraint_on: ability_id
8-
- name: pokemon_v2_versiongroup
9-
using:
10-
foreign_key_constraint_on: version_group_id
5+
- name: pokemon_v2_ability
6+
using:
7+
foreign_key_constraint_on: ability_id
8+
- name: pokemon_v2_versiongroup
9+
using:
10+
foreign_key_constraint_on: version_group_id
1111
array_relationships:
12-
- name: pokemon_v2_abilitychangeeffecttexts
13-
using:
14-
foreign_key_constraint_on:
15-
column: ability_change_id
16-
table:
17-
name: pokemon_v2_abilitychangeeffecttext
18-
schema: public
12+
- name: pokemon_v2_abilitychangeeffecttexts
13+
using:
14+
foreign_key_constraint_on:
15+
column: ability_change_id
16+
table:
17+
name: pokemon_v2_abilitychangeeffecttext
18+
schema: public
1919
select_permissions:
20-
- permission:
21-
allow_aggregations: true
22-
columns: "*"
23-
filter: {}
24-
limit: 100000
25-
role: anon
20+
- role: anon
21+
permission:
22+
columns: '*'
23+
filter: {}
24+
limit: 100000
25+
allow_aggregations: true

0 commit comments

Comments
 (0)