Skip to content

Commit

Permalink
feat: new graphiql
Browse files Browse the repository at this point in the history
  • Loading branch information
Naramsim committed Jan 22, 2025
1 parent 6a2a075 commit 996b698
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
13 changes: 7 additions & 6 deletions Resources/compose/docker-compose-prod-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ services:
restart: "no"

web:
volumes:
- graphiql:/public-console:ro
depends_on:
graphiql:
graphql-engine:
condition: service_healthy
logging:
driver: gcplogs

Expand All @@ -30,10 +32,9 @@ services:
HASURA_GRAPHQL_EVENTS_HTTP_POOL_SIZE: 10

graphiql:
image: pokeapi/graphiql:1.0.1
command: sh -c 'cp -a /app/static/. /transfer/ && tail -f /etc/passwd'
volumes:
- graphiql:/transfer
image: pokeapi/graphiql:2.0.0
expose:
- 80
depends_on:
- graphql-engine
restart: always
Expand Down
14 changes: 11 additions & 3 deletions Resources/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ http {
server graphql-engine:8080 fail_timeout=0;
}

upstream graphiql_upstream {
server graphiql:80 fail_timeout=0;
}

geo $limit {
default 1;
10.0.0.0/8 0;
Expand Down Expand Up @@ -99,9 +103,13 @@ http {
}

location /graphql/console {
alias /public-console;
index index.html;
try_files $uri $uri/ /index.html =405;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://graphiql_upstream/;
}

location /graphql/v1beta {
Expand Down

0 comments on commit 996b698

Please sign in to comment.