You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 1, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+21-19Lines changed: 21 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,12 @@
1
+
# Note!!!
2
+
3
+
Since this project is in very early stage and due to [graphql-go/graphql](https://github.com/graphql-go/graphql)'s **overwhelming verbosity** the project is migrating to [neelance/graphql-go](https://github.com/neelance/graphql-go), which is more idiomatic and easy to use. ***This branch is gonna be used for such purposes.***
4
+
1
5
# GraphQL Docker API
2
6
3
-
[](https://gitlab.com/klud/graphql-docker-api/commits/master)[](https://microbadger.com/images/klud/docker-gql"Get your own version badge on microbadger.com")[](https://microbadger.com/images/klud/docker-gql"Get your own image badge on microbadger.com")[](https://goreportcard.com/report/gitlab.com/klud/graphql-docker-api)[](LICENSE)
7
+
[](https://gitlab.com/klud/graphql-docker-api/commits/migrate-lib)[](https://goreportcard.com/report/gitlab.com/klud/graphql-docker-api)[](https://microbadger.com/images/klud/docker-gql:0.1.0-rc"Get your own version badge on microbadger.com")[](https://microbadger.com/images/klud/docker-gql:0.1.0-rc"Get your own image badge on microbadger.com")[](https://hub.docker.com/r/klud/docker-gql/)[](LICENSE)
> A GraphQL Server for the Docker API, written in Golang.
8
12
@@ -11,16 +15,16 @@
11
15
* Schema files can be found [here](resources/schema).
12
16
* You can check the query-ready fields in the [TODO list](#todo)
13
17
14
-
**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.
18
+
**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.
15
19
16
20
## Getting Started
17
21
18
22
### Building from source
19
23
20
-
* Get the package: `go get -d gitlab.com/klud/graphql-docker-api/cmd/gql-dkr`
24
+
* Get the package: `go get -d gitlab.com/klud/graphql-docker-api/cmd/gdapi`
21
25
* Dependencies
22
-
***Not using [`dep`](README.md#open-source-libraries-and-tools).** Go to the project folder with `cd $GOPATH/src/gitlab.com/klud/graphql-docker-api/cmd/gql-dkr` and `go get -d ./`, this will download the depedencies needed, once that's done build the package with `go build`.
23
-
***Using [`dep`](README.md#open-source-libraries-and-tools).** Go to the project folder with `cd $GOPATH/src/gitlab.com/klud/graphql-docker-api`, and run `dep install`, now get to `$GOPATH/src/gitlab.com/klud/graphql-docker-api/cmd/gql-dkr` and build the package with `go build`.
26
+
***Not using [`dep`](README.md#open-source-libraries-and-tools).** Go to the project folder with `cd $GOPATH/src/gitlab.com/klud/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`.
27
+
***Using [`dep`](README.md#open-source-libraries-and-tools).** Go to the project folder with `cd $GOPATH/src/gitlab.com/klud/graphql-docker-api`, and run `dep install`, now get to `$GOPATH/src/gitlab.com/klud/graphql-docker-api/cmd/gdapi` and build the package with `go build`.
24
28
25
29
**That's pretty much it. Congrats You have GraphQL Docker API on your system now.**
*`API_ENDPOINT`: Endpoint the API will work on (default: `"/graphql"`).
70
73
*`DOCKER_CERT_PATH`: When using safe connection to Docker Remote API.
71
74
*`DOCKER_HOST`: Host the API will retrieve information from (default: `"/var/run/docker.sock"`).
72
75
*`GQL_PORT`: Port the API will listen on (default: `":8080"`).
73
-
*`GRAPHIQL`: UI to execute queries in the browser. It's enabled by default, `GRAPHIQL=0` disables it.
76
+
*`GRAPHIQL`: It's enabled by default, `GRAPHIQL=0` must be set in order to disable it.
77
+
*`UI_ENDPOINT`: Endpoint GraphiQL will work on (default: `"/graphql"`).
74
78
75
79
### Notes
76
80
77
81
* If using a Docker Remote API, this must be specified with the either HTTP or HTTPS protocols (e.g,: `DOCKER_HOST="http://<host>:<port>"`).
78
82
* 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](https://docs.docker.com/engine/security/https/#create-a-ca-server-and-client-keys-with-openssl) env var.
79
-
*`GRAPHIQL` can be reached at the `API_ENDPOINT`; disabling is advised when using in production.
83
+
*`GRAPHIQL` can be reached at the `UI_ENDPOINT`; disabling is advised when using in production.
84
+
* If GraphiQL is disabled, `UI_ENDPOINT` must not be set at all.
80
85
81
86
## TODO
82
87
@@ -105,13 +110,10 @@ klud/docker-gql
105
110
106
111
## Open-Source libraries and tools
107
112
108
-
*[Dep](https://github.com/golang/dep) for *vendoring* dependencies
0 commit comments