``` hello-world-p docker exec -it 0ed6b3580a1e /b...
# orm-help
m
Copy code
hello-world-p docker exec -it 0ed6b3580a1e /bin/bash
root@0ed6b3580a1e:/usr/src/app# ls
Dockerfile  datamodel.graphql  docker-compose.yml  prisma.yml
root@0ed6b3580a1e:/usr/src/app# prisma deploy
 ▸    Could not connect to server at <http://localhost:4466>. Please check if your server is running.

Get in touch if you need help: <https://www.prisma.io/forum/>
To get more detailed output, run $ export DEBUG="*"
root@0ed6b3580a1e:/usr/src/app#
d
Can you send the output of
docker ps
?
m
Copy code
➜  hello-world-p docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                    NAMES
4388e166787f        mysql:5.7                   "docker-entrypoint.s…"   4 seconds ago       Up 3 seconds        3306/tcp                 hello-world-p_mysql_1
a12e14e9f157        prismagraphql/prisma:1.12   "node"                   4 seconds ago       Up 3 seconds        0.0.0.0:4466->4466/tcp   hello-world-p_prisma_1
➜  hello-world-p
that is the output after checking for the running docker containers
@divyendu
d
Interesting, why does it say up "4 seconds ago", did you re-run
docker-compose up -d
?
m
nope that was the first issue i had it keeps restarting, but if i add tty:true in the docker-compose file it stops restarting
but without that the docker container keeps restarting
here is the
docker-compose.yml
file
Copy code
version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.12
    restart: always
    ports:
    - "4466:4466"
    tty: true
    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:
but for this docker i just ran it again so it say 4 seconds ago, but if i remove the tty:true then it keeps reseting by the seconds
@divyendu
d
Can you please create an issue here: https://github.com/prismagraphql/prisma/issues/new?template=bug_report.md with all the details and also the output of
docker logs hello-world-p_prisma_1
m
@divyendu okay will do that now, but i can't get an output with
docker logs hello-world-p_prisma_1
because it keeps restarting, i figure out why it wasn't able to connect to server at http://localhost:4466. thats because when i added tty:true it never actually runs, because somewhere the prisma container is crashing, so when you have that set to true it doesn't restart
so without that it will try and restart each time it crashes
but i am not sure why its crashing tho
d
You should be able to get the logs of your prisma container, do
docker ps
find the name of prisma container and then do
docker logs <prisma container name>
m
@divyendu yeah i did that and it outputs nothing just goes to the next line
here is the output when i run it without the detach flag
Copy code
postgres_1  | PostgreSQL init process complete; ready for start up.
postgres_1  | 
postgres_1  | 2018-07-30 13:50:11.223 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres_1  | 2018-07-30 13:50:11.223 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres_1  | 2018-07-30 13:50:11.227 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1  | 2018-07-30 13:50:11.238 UTC [69] LOG:  database system was shut down at 2018-07-30 13:50:11 UTC
postgres_1  | 2018-07-30 13:50:11.244 UTC [1] LOG:  database system is ready to accept connections
hello-world_prisma_1 exited with code 0
hello-world_prisma_1 exited with code 0
hello-world_prisma_1 exited with code 0
hello-world_prisma_1 exited with code 0
hello-world_prisma_1 exited with code 0
Copy code
➜  hello-world docker logs hello-world-p_prisma_1
➜  hello-world
as you can see i ran the logs command and nothing outputs @divyendu
d
Asked for some more info on the issue 🙂
m
@divyendu added the addition info
👍 1
d
Can you please also add the versions of various things asked for in the original issue template => https://github.com/prismagraphql/prisma/issues/new?template=bug_report.md Will look into it now!
m
@divyendu i added the following
Copy code
The OS I am using OS X High Sierra 10.13.6, using the latest node (ie note:latest) and for the prisma just running the prisma init command. not sure of the CLI version
wasn't sure of the version of prisma CLI
sorry 😢
d
You can check it via
prisma --version
Sure, no problem, we will make it all much easier with detailed feedback like this 🙌 Thanks for helping me out 🙏 🙂
m
Anytime, i really like what Prisma is trying to do, so if I can help in anyway I am all for it.
okay let me run the command to get the version of prisma
added the version to the issue as well
idk if this helps or not but i do not have prisma installed on my local machine, i use everything within docker, so i don't have npm node or anything installed locally.
i run a docker container first to get all my npm packages, and node and then i use that to create a project with a docker-compose.yml file and or dockerfile if need be
@divyendu
👍 1
for example this is how i start the project `docker run -v `pwd`:/usr/src/app -it node:latest /bin/bash -c "npm install prisma --global; sudo prisma init hello-world; cp -a /hello-world/. /usr/src/app/"` but i did notice this error
Copy code
errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/root/.cache/prisma' }
(node:25) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir '/root/.cache/prisma'
not sure if this would cause it to keep restarting
d
Thanks for the additional info, please put as much info as possible on the issue itself.. best if all info is in once place 🙂 Easy for slack conversations to get lost!
m
@divyendu so the issue is i needed prisma installed locally
so it didn't seem to work if i kept everything in docker
i guess it didn't know where to install prisma in the docker directory structure
👍 1