https://github.com/graphql-editor/stucco-router-azure-worker
Stucco router running on Azure Functions
https://github.com/graphql-editor/stucco-router-azure-worker
Last synced: 11 months ago
JSON representation
Stucco router running on Azure Functions
- Host: GitHub
- URL: https://github.com/graphql-editor/stucco-router-azure-worker
- Owner: graphql-editor
- License: mit
- Created: 2020-03-03T12:31:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-02T09:00:58.000Z (about 6 years ago)
- Last Synced: 2025-01-01T21:46:32.873Z (over 1 year ago)
- Language: Go
- Size: 107 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About
Stucco router that can be run by Azure Functions host.
# Usage
## Run locally
Currently router can only be ran locally on Linux and macOS because it depends on [azure-functions-golang-worker](https://github.com/graphql-editor/azure-functions-golang-worker/) which does not support running plugin functions on Windows.
### Dependencies
* [azure-functions-core-tools@v3](https://github.com/Azure/azure-functions-core-tools)
* [azure-functions-golang-worker](https://github.com/graphql-editor/azure-functions-golang-worker/)
### Run
```
$ STUCCO_SCHEMA=path/to/schema.graphql STUCCO_CONFIG=path/to/stucco.json STUCCO_WORKER_BASE_URL=http://worker.url func start
```
## Docker
### New image
To create new router image just add schema.graphql and stucco.json to base image
```
FROM gqleditor/stucco-router-azure-worker:latest
COPY schema.graphql /home/site/wwwroot/schema.graphql
COPY stucco.json /home/site/wwwroot/stucco.json
```
### Run using base image
```
$ docker run -p 8080:80 -e STUCCO_SCHEMA=path/to/schema.graphql -e STUCCO_CONFIG=path/to/stucco.json -e STUCCO_WORKER_BASE_URL=http://worker.url gqleditor/stucco-router-azure-worker:latest
```
# Notes
By default function.json has `function` auth level which makes them inaccessible locally. Edit `authLevel` field in graphql/function.json to make it debuggable locally.