I had the image upload example working yesterday: ...
# orm-help
j
I had the image upload example working yesterday: https://github.com/graphcool/prisma/tree/master/examples/file-handling-s3 Today Im running into issues which I think are with docker.
Copy code
$ 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.
Copy code
$ 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
Copy code
$ 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
Copy code
$ 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:
Copy code
{
  "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"
      ]
    }
  ]
}
My docker-compose.yml was missing some stuff:
Copy code
version: '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:
k
Did you fix it? I hope so, because I had this same exact problem a week or two ago and I was about to ask you for your docker-compose file to see if it was messed up like it was for me.
j
Yes this fixed it
Try running ‘prisma init’ in an empty folder, then you can copy the docker-compose file over to the folder with your datamodel and boot up docker from that dir
👍 2