Prisma1: [graphcool deploy local] - docker-compose : â–¸ 1

Created on 29 Dec 2017  Â·  7Comments  Â·  Source: prisma/prisma1

UBUNTU 16.04 with graphcool@beta [1.0.0-beta2.1.1] && graphql-cli [2.2.0]

It can be related to : https://github.com/graphql-boilerplates/node-graphql-server/issues/69

Tested with boilerplate project node-graphql-server/advanced

graphcool deploy

? Please choose the cluster you want to deploy "graphql-boilerplate@dev" to

local
Running local Graphcool cluster at http://localhost:60000
This may take several minutes
$ docker-compose up -d --remove-orphans

docker Define and run multi-container applications with Docker.
docker
docker Usage:
docker docker-compose [-f ...] [options] [COMMAND] [ARGS...]
docker docker-compose -h|--help
docker
docker Options:
docker -f, --file FILE Specify an alternate compose file (default: docker-compose.yml)
docker -p, --project-name NAME Specify an alternate project name (default: directory name)
docker --verbose Show more output
docker -v, --version Print version and exit
docker -H, --host HOST Daemon socket to connect to
docker
docker --tls Use TLS; implied by --tlsverify
docker --tlscacert CA_PATH Trust certs signed only by this CA
docker --tlscert CLIENT_CERT_PATH Path to TLS certificate file
docker --tlskey TLS_KEY_PATH Path to TLS key file
docker --tlsverify Use TLS and verify the remote
docker --skip-hostname-check Don't check the daemon's hostname against the name specified
docker in the client certificate (for example if your docker host
docker is an IP address)
docker
docker Commands:
docker build Build or rebuild services
docker bundle Generate a Docker bundle from the Compose file
docker config Validate and view the compose file
docker create Create services
docker down Stop and remove containers, networks, images, and volumes
docker events Receive real time events from containers
docker exec Execute a command in a running container
docker help Get help on a command
docker kill Kill containers
docker logs View output from containers
docker pause Pause services
docker port Print the public port for a port binding
docker ps List containers
docker pull Pulls service images
docker push Push service images
docker restart Restart services
docker rm Remove stopped containers
docker run Run a one-off command
docker scale Set number of containers for a service
docker start Start services
docker stop Stop services
docker unpause Unpause services
docker up Create and start containers
docker version Show the Docker-Compose version information
â–¸ 1

Get in touch if you need help: https://www.graph.cool/forum
To get more detailed output, run $ export DEBUG="*"

$ docker -v
Docker version 17.09.1-ce, build 19e2cf6
$docker-compose -v
docker-compose version 1.8.0, build unknown

Most helpful comment

@kbrandwijk thank you for the quick response. After upgrading to latest docker-compose, I'm able to run the demo now.

To save anyone who will come here some troubles, here is the install instruction:

curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

See https://github.com/docker/compose/releases for more details

All 7 comments

I can reproduce this bug.

graphcool -v
graphcool/1.0.0-beta2.1.1 (linux-x64) node-v8.9.3

This indicates an old version of docker-compose. Please try updating it. See #902, #904.

@kbrandwijk thank you for the quick response. After upgrading to latest docker-compose, I'm able to run the demo now.

To save anyone who will come here some troubles, here is the install instruction:

curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

See https://github.com/docker/compose/releases for more details

@Illuday does this fix work for you? 🙂

Well ! After many tries (I'm using typescript advanced boilerplate), this is the way I found to run my project :

After those :

update docker - cf https://github.com/graphcool/framework/issues/1458#issuecomment-354655669
update graphcool@beta

I noted that sudo gc deploy and gc deploy does two differents things :

sudo gc deploy

Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

gc deploy

 â–¸    [ERROR] in /home/manu/Project/test2/graphcool.yml: 
 â–¸    graphcool.yml should have required property 'stage'. missingProperty:
 â–¸    stage

I tried to add stage and cluster to my graphcool.yml

sudo gc deploy

 â–¸    [ERROR] in /home/manu/Project/test2/graphcool.yml: 
 â–¸    graphcool.yml should NOT have additional properties. additionalProperty:
 â–¸    stage

gc deploy

Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

After this I try to up my container from :

sudo gc local start

Then :

gc deploy :ok:
yarn start

Server is running on http://localhost:4000
(node:10216) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: [ERROR] in /home/manu/Project/downate/graphcool.yml: 
graphcool.yml should NOT have additional properties. additionalProperty: stage
(node:10216) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Well I finished by removing thos props. All is working now.


To summarize


After running

sudo gc local start
I could use sudo gc deploy in every of my projects (also after a gc local stop, no need to gc local start anymore).

Also, no need to add anything in my graphcool.yml (BUT https://github.com/graphcool/framework/issues/1461 make me perplexed)

Awesome, thanks for digging into this @Illuday!

I've updated docker compose. But am also getting this error when running graphql prepare. I'm going to try removing the docker images and kicking off deploy again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fi1osof picture Fi1osof  Â·  3Comments

jannone picture jannone  Â·  3Comments

tbrannam picture tbrannam  Â·  3Comments

akoenig picture akoenig  Â·  3Comments

dohomi picture dohomi  Â·  3Comments