3/26/2019 - 11:27 AM

docker with prisma



Work process

in prisma.yml
set endpoint as

endpoint: http://localhost:4466
cd ./prisma
prisma deploy

this will hook seeding automatically too

Import and Export

how to

When Error

Sympton: if I can't connect to docker

docker request to http://localhost:4466/ failed,

Suspect: prisma server might be not running Check: use below command

docker ps

then I can see

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                 NAMES
b34637530bdb        mysql:5.7           "docker-entrypoint.s…"   6 days ago          Up 5 minutes        3306/tcp, 33060/tcp   temple-resourc

here the mysql is running but no prisma server...

        > docker images
REPOSITORY             TAG                 IMAGE ID            CREATED             SIZE
prismagraphql/prisma   1.29                8fcf2f896614        11 days ago         257MB
mysql                  5.7                 ee7cbd482336        3 weeks ago         372MB

i can see prisma is installed but not running....
Solution : just restart computer.... (I think when the port(4466) is blocked somehow... it can't run prisma so just restarting computer will solve it)