Mr. Bell
07/27/2018, 12:45 AMhello-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#
divyendu
07/28/2018, 4:21 AMdocker ps
?Mr. Bell
07/29/2018, 4:36 PM➜ 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
Mr. Bell
07/29/2018, 4:37 PMMr. Bell
07/29/2018, 4:38 PMdivyendu
07/29/2018, 4:39 PMdocker-compose up -d
?Mr. Bell
07/29/2018, 4:49 PMMr. Bell
07/29/2018, 4:49 PMMr. Bell
07/29/2018, 4:49 PMdocker-compose.yml
file 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:
Mr. Bell
07/29/2018, 4:50 PMMr. Bell
07/29/2018, 4:50 PMdivyendu
07/29/2018, 5:19 PMdocker logs hello-world-p_prisma_1
Mr. Bell
07/30/2018, 1:36 PMdocker 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 restartMr. Bell
07/30/2018, 1:36 PMMr. Bell
07/30/2018, 1:36 PMdivyendu
07/30/2018, 1:50 PMdocker ps
find the name of prisma container and then do docker logs <prisma container name>
Mr. Bell
07/30/2018, 1:52 PMMr. Bell
07/30/2018, 1:52 PMMr. Bell
07/30/2018, 1:52 PMpostgres_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
Mr. Bell
07/30/2018, 1:52 PMMr. Bell
07/30/2018, 1:53 PM➜ hello-world docker logs hello-world-p_prisma_1
➜ hello-world
Mr. Bell
07/30/2018, 1:53 PMdivyendu
07/30/2018, 1:54 PMMr. Bell
07/30/2018, 1:57 PMdivyendu
07/30/2018, 1:59 PMMr. Bell
07/30/2018, 2:06 PMThe 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
Mr. Bell
07/30/2018, 2:07 PMMr. Bell
07/30/2018, 2:07 PMdivyendu
07/30/2018, 2:07 PMprisma --version
divyendu
07/30/2018, 2:09 PMMr. Bell
07/30/2018, 2:20 PMMr. Bell
07/30/2018, 2:21 PMMr. Bell
07/30/2018, 2:22 PMMr. Bell
07/30/2018, 2:23 PMMr. Bell
07/30/2018, 2:23 PMMr. Bell
07/30/2018, 2:24 PMMr. Bell
07/30/2018, 2:34 PMerrno: -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 restartingdivyendu
07/30/2018, 5:09 PMMr. Bell
07/31/2018, 4:17 PMMr. Bell
07/31/2018, 4:17 PMMr. Bell
07/31/2018, 4:17 PM