Jim
05/10/2018, 3:06 AM$ prisma deploy
warning prisma.yml: "cluster", "service" and "stage" are deprecated and will be replaced with "endpoint".
To get the endpoint, run prisma info. Read more here: <https://bit.ly/migrate-prisma-yml>
Created docker-compose.yml with a local prisma server.
Please run $ docker-compose up -d to start your local prisma.
Note: prisma local start will be deprecated soon in favor of the direct usage of docker-compose.
$ docker-compose up -d
WARNING: Found orphan containers (database_mysql_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
database_prisma_1 is up-to-date
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
edc498e32eaf prismagraphql/prisma:1.8 "/bin/sh -c /app/sta…" 12 minutes ago Restarting (1) 16 seconds ago database_prisma_1
8db6310c5861 mysql:5.7 "docker-entrypoint.s…" 18 hours ago Up About a minute 3306/tcp database_mysql_1
661efd2ad875 mysql:5.7 "docker-entrypoint.s…" 36 hours ago Up About a minute 3306/tcp temp_db_1
$ npm run start
> prisma-file-handling-s3@1.0.0 start /Users/jameschetwood/Projects/prisma/img-up-test/file-handling-s3
> dotenv -- nodemon -x ts-node -e ts,graphql src/index.ts
[nodemon] 1.14.11
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `ts-node src/index.ts`
Type "Node" is missing a "resolveType" resolver. Pass false into "resolverValidationOptions.requireResolversForResolveType" to disable this warning.
Server is running on <http://localhost:4000>
Request to <http://localhost:4466/file-handling-s3-example/dev>:
query:
query ($_where: FileWhereInput, $_orderBy: FileOrderByInput, $_skip: Int, $_after: String, $_before: String, $_first: Int, $_last: Int) {
files(where: $_where, orderBy: $_orderBy, skip: $_skip, after: $_after, before: $_before, first: $_first, last: $_last) {
id
url
name
size
secret
contentType
}
}
operationName: null
variables:
{}
[Network error]: FetchError: request to <http://localhost:4466/file-handling-s3-example/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
Error: request to <http://localhost:4466/file-handling-s3-example/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
// Ive shortened this message
I now have a playground up at http://localhost:4000/ and it has access to my schema, but when I run a query I get an error:
{
"data": null,
"errors": [
{
"message": "request to <http://localhost:4466/file-handling-s3-example/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"files"
]
}
]
}
Jim
05/10/2018, 3:57 AMversion: '3'
services:
prisma:
image: prismagraphql/prisma:1.8
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
# managementApiSecret: my-secret
databases:
default:
connector: mysql
host: mysql
port: 3306
user: root
password: prisma
migrations: true
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: prisma
volumes:
- mysql:/var/lib/mysql
volumes:
mysql:
KyleG
05/10/2018, 4:54 AMJim
05/10/2018, 5:21 AMJim
05/10/2018, 5:22 AM