mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-26 05:10:21 +00:00
chore: tweak perf/disable cache
This commit is contained in:
parent
e7c0397d52
commit
5b6b667a9d
3 changed files with 10 additions and 7 deletions
|
@ -15,10 +15,12 @@ services:
|
||||||
graphql-engine:
|
graphql-engine:
|
||||||
cpus: 0.7
|
cpus: 0.7
|
||||||
memswap_limit: 3g
|
memswap_limit: 3g
|
||||||
mem_limit: 450m
|
mem_limit: 700m
|
||||||
environment:
|
environment:
|
||||||
HASURA_GRAPHQL_DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-pokeapi}"
|
HASURA_GRAPHQL_DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-pokeapi}"
|
||||||
HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
|
HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
|
||||||
|
HASURA_GRAPHQL_SCHEMA_SYNC_POLL_INTERVAL: 0
|
||||||
|
HASURA_GRAPHQL_EVENTS_HTTP_POOL_SIZE: 10
|
||||||
|
|
||||||
graphiql:
|
graphiql:
|
||||||
image: pokeapi/graphiql:1.0.1
|
image: pokeapi/graphiql:1.0.1
|
||||||
|
|
|
@ -94,11 +94,11 @@ http {
|
||||||
|
|
||||||
location /graphql/v1beta {
|
location /graphql/v1beta {
|
||||||
proxy_read_timeout 70s;
|
proxy_read_timeout 70s;
|
||||||
proxy_cache small;
|
# proxy_cache small;
|
||||||
proxy_cache_valid 200 10d;
|
# proxy_cache_valid 200 10d;
|
||||||
proxy_cache_valid any 0;
|
# proxy_cache_valid any 0;
|
||||||
proxy_cache_methods POST;
|
# proxy_cache_methods POST;
|
||||||
proxy_cache_key "$request_method$request_uri$request_body";
|
# proxy_cache_key "$request_method$request_uri$request_body";
|
||||||
limit_req zone=graphqlDefaultLimit burst=100 nodelay;
|
limit_req zone=graphqlDefaultLimit burst=100 nodelay;
|
||||||
limit_req_status 429;
|
limit_req_status 429;
|
||||||
expires 30m; # client-side caching, one minute for each API resource
|
expires 30m; # client-side caching, one minute for each API resource
|
||||||
|
|
|
@ -45,7 +45,7 @@ services:
|
||||||
- ./Resources/nginx/ssl:/ssl:ro
|
- ./Resources/nginx/ssl:/ssl:ro
|
||||||
|
|
||||||
graphql-engine:
|
graphql-engine:
|
||||||
image: hasura/graphql-engine:v2.0.0-alpha.5
|
image: hasura/graphql-engine:v2.0.8
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -55,6 +55,7 @@ services:
|
||||||
HASURA_GRAPHQL_DATABASE_URL: postgres://${POSTGRES_USER:-ash}:${POSTGRES_PASSWORD:-pokemon}@db:5432/${POSTGRES_DB:-pokeapi}
|
HASURA_GRAPHQL_DATABASE_URL: postgres://${POSTGRES_USER:-ash}:${POSTGRES_PASSWORD:-pokemon}@db:5432/${POSTGRES_DB:-pokeapi}
|
||||||
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
|
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
|
||||||
HASURA_GRAPHQL_DEV_MODE: "false"
|
HASURA_GRAPHQL_DEV_MODE: "false"
|
||||||
|
HASURA_GRAPHQL_LOG_LEVEL: "warn"
|
||||||
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
|
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
|
||||||
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-pokemon}
|
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-pokemon}
|
||||||
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anon
|
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anon
|
||||||
|
|
Loading…
Reference in a new issue