All Projects → ulm0 → graphql-docker-api

ulm0 / graphql-docker-api

Licence: MIT license
A GraphQL Server for the Docker API

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to graphql-docker-api

Typegql
Create GraphQL schema with TypeScript classes.
Stars: ✭ 415 (+628.07%)
Mutual labels:  schema, graphql-server
Workshop-GraphQL
A GraphQL Server made for the workshop
Stars: ✭ 22 (-61.4%)
Mutual labels:  schema, graphql-server
Pollinate
Template your base files and generate new projects from Git(Hub).
Stars: ✭ 213 (+273.68%)
Mutual labels:  schema
bunjil
A GraphQL bastion server with schema merging, authentication and authorization with Policy Based Access Control
Stars: ✭ 25 (-56.14%)
Mutual labels:  graphql-server
E Commerce Db
Database schema for e-commerce (webstores) sites.
Stars: ✭ 245 (+329.82%)
Mutual labels:  schema
Codemeta
Minimal metadata schemas for science software and code, in JSON-LD
Stars: ✭ 218 (+282.46%)
Mutual labels:  schema
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+343.86%)
Mutual labels:  schema
Mongoke
Instant Graphql for MongoDb (active branch is golang, rewrite in process)
Stars: ✭ 203 (+256.14%)
Mutual labels:  schema
NoSQLDataEngineering
NoSQL Data Engineering
Stars: ✭ 25 (-56.14%)
Mutual labels:  schema
Scenic
Scenic is maintained by Derek Prior, Caleb Hearth, and you, our contributors.
Stars: ✭ 2,856 (+4910.53%)
Mutual labels:  schema
graphql-schema-diff
📄🔄📄 Returns the diff of two GraphQL schemas. Detects dangerous and breaking changes.
Stars: ✭ 54 (-5.26%)
Mutual labels:  schema
Graphql Rover
🚀 GraphQL + Vue.js + D3.js schema viewer, powered by introspection.
Stars: ✭ 239 (+319.3%)
Mutual labels:  schema
Soqlx
SoqlXplorer is an awesome tool for developers using the Salesforce.com platform.
Stars: ✭ 220 (+285.96%)
Mutual labels:  schema
DotNetGraphQL
A sample demonstrating how to create a GraphQL Backend in .NET and consume it from a .NET mobile app created using Xamarin
Stars: ✭ 78 (+36.84%)
Mutual labels:  graphql-server
Schematics
Project documentation: https://schematics.readthedocs.io/en/latest/
Stars: ✭ 2,461 (+4217.54%)
Mutual labels:  schema
another-json-schema
Another JSON Schema validator, simple & flexible & intuitive.
Stars: ✭ 48 (-15.79%)
Mutual labels:  schema
Hodur Engine
Hodur is a domain modeling approach and collection of libraries to Clojure. By using Hodur you can define your domain model as data, parse and validate it, and then either consume your model via an API or use one of the many plugins to help you achieve mechanical results faster and in a purely functional manner.
Stars: ✭ 208 (+264.91%)
Mutual labels:  schema
Truss
Assertions API for Clojure/Script
Stars: ✭ 239 (+319.3%)
Mutual labels:  schema
Dry Schema
Coercion and validation for data structures
Stars: ✭ 249 (+336.84%)
Mutual labels:  schema
pony-capnp
Cap’n Proto plugin for generating serializable Pony classes. 🐴 - 🎩'n 🅿️
Stars: ✭ 19 (-66.67%)
Mutual labels:  schema

GraphQL Docker API

pipeline status Go Report Card Docker Pulls License

Logo

A GraphQL Server for the Docker API, written in Golang.

GraphQL Schema

  • Schema files can be found here.
  • You can check the query-ready fields in the TODO list

Note: It's important to keep this schema synced with the types implemented in the wrapper, best efforts are made in order to keep it so. That being said, You need to know this schema is subject to change as the time goes by and new changes are introduced in the Docker API and this wrapper as well.

Getting Started

Building from source

  • Get the package: go get -d gitlab.com/ulm0/graphql-docker-api/cmd/gdapi
  • Dependencies
    • Not using dep. Go to the project folder with cd $GOPATH/src/gitlab.com/ulm0/graphql-docker-api/cmd/gdapi and go get -d ./, this will download the depedencies needed, once that's done build the package with go build.
    • Using dep. Go to the project folder with cd $GOPATH/src/gitlab.com/ulm0/graphql-docker-api, and run dep ensure, now get to $GOPATH/src/gitlab.com/ulm0/graphql-docker-api/cmd/gdapi and build the package with go build.

That's pretty much it. Congrats You have GraphQL Docker API on your system now.

Docker image

Local socket

docker run -d \
--name docker-gql \
-p 8080:8080 \
-e API_ENDPOINT="/api" \
-v /var/run/docker.sock:/var/run/docker.sock \
ulm0/docker-gql

Note: The -v /var/run/docker.sock:/var/run/docker.sock option can be used in Linux environments only.

Remote host

HTTP
docker run -d \
--name docker-gql \
-p 8080:8080 \
-e API_ENDPOINT="/api" \
-e DOCKER_HOST="http://<host>:<port>" \
ulm0/docker-gql
HTTPS
docker run -d \
--name docker-gql \
-p 8080:8080 \
-e API_ENDPOINT="/api" \
-e DOCKER_HOST="https://<host>:<port>" \
-v /path/to/folder/containing/the/docker/certs:/etc/docker \
ulm0/docker-gql

Environment variables

  • DOCKER_CERT_PATH: When using safe connection to Docker Remote API.
  • DOCKER_HOST: Host the API will retrieve information from (default: "/var/run/docker.sock").
  • GQL_PORT: Port the API will listen on (default: ":8080").
  • GRAPHIQL: It's enabled by default, GRAPHIQL=0 must be set in order to disable it.
  • API_ENDPOINT: Endpoint for the API (default: "/graphql").

Notes

  • If using a Docker Remote API, this must be specified with the either HTTP or HTTPS protocols (e.g,: DOCKER_HOST="http://<host>:<port>").
  • When using HTTPS, the TLS certs must be placed in /etc/docker or the /path/to/folder/containing/the/docker/certs must be mounted under /etc/docker inside the running container, and must follow the semantics behind the DOCKER_CERT_PATH env var.
  • GRAPHIQL can be reached at the API_ENDPOINT; disabling is advised when using in production, you can do so by setting GRAPHIQL=0.

TODO

  • GraphQL Queries
    • Map to endpoints of the Docker API
      • Containers
      • Images
      • Swarm
        • Services
        • Stacks
      • System
      • Volumes
      • Secrets
      • Tasks
  • GraphQL Mutations
  • GraphQL Subscriptions if possible, especially for Docker events
  • GraphQL Descriptions
  • Authentication / Authorization
  • Makefile for local build
    • Binary
    • Docker image
  • CI integration
  • Build from source how-to
  • Docker image how-to

Open-Source libraries and tools


forthebadge forthebadge

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].