Add Hasura GraphQL Engine container with nginx proxy
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 1m31s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 1m31s
Adds Hasura v2.44.0 service connected to the existing Postgres database, proxied through nginx at /hasura/ with WebSocket support for the console. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -129,6 +129,21 @@ http {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /hasura {
|
||||
return 301 /hasura/;
|
||||
}
|
||||
|
||||
location /hasura/ {
|
||||
proxy_pass http://$HASURA_HOST:$HASURA_PORT/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
@@ -223,6 +238,21 @@ http {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /hasura {
|
||||
return 301 /hasura/;
|
||||
}
|
||||
|
||||
location /hasura/ {
|
||||
proxy_pass http://$HASURA_HOST:$HASURA_PORT/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user