Is there anybody who worked with prisma and dokku?...
# orm-help
g
Is there anybody who worked with prisma and dokku? I cannot get how I can connect my database that I created using https://github.com/dokku/dokku-postgres I tried to log all information about this database and maybe see such parametrs as host, port, database, schema, user, password, ssl so I could pass this information to
docker-compose.yml
, but I saw only this:
Copy code
=====> Container Information
       Config dir:          /var/lib/dokku/services/postgres/dailyq-database/config
       Data dir:            /var/lib/dokku/services/postgres/dailyq-database/data
       Dsn:                 <postgres://postgres:5348449fdedeb909903f23c9d22cd786@dokku-postgres-dailyq-database:5432/dailyq_database>
       Exposed ports:       -
       Id:                  f89f3a9702490a24c0ec20006a0f51583ef6e0963e4b0c553ee97028c1e77101
       Internal ip:         172.17.0.2
       Links:               dailyq-api
       Service root:        /var/lib/dokku/services/postgres/dailyq-database
       Status:              running
       Version:             postgres:10.4
n
g
no, i didn't, lemme try
But what about password? Should I use the one provided in the tutorial?
n
No 🙂
That's an example.
g
Hm, is there same problem as with
.graphqlconfig.yml
? I passed password as
${env:DATABASE_PASSWORD}
in
config.yml
and set env variables like
dokku config:set dailyq-api env:DATABASE_PASSWORD=""
but it throw this error:
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
@nilan another stupid question, sorry 🙂
Dockerfile
from this tutorial:
Copy code
FROM prismagraphql/prisma:1.14
ARG PRISMA_CONFIG_PATH
ENV PRISMA_CONFIG_PATH prisma.yml
COPY config.yml prisma.yml
EXPOSE 4466
Should I change
PRISMA_CONFIG_PATH
by myself? Or I should keep it like this?
n
I haven't followed the tutorial myself yet, maybe you can try around a bit to find out 🙂
g
yea, this tutorial is at least something, but it should be improved...
for example, you should enter password from
DATABASE_URL
dokku env variable, not to come up with yours
n
it's a community tutorial and fully open source, so I would love to see your improvement suggestions later on 🙂
g
okay then 🙂
👌 1
@nilan have you thought to add some highlighting for code that should be changed? It could help a lot for noobies like me for sure
w
Hey there ✌️. I wrote that example and have a working instance of prisma on my dokku server. You don't have to change the dockerfile at all. Just replace the user and password within your Prisma configuration. Let me know if you need further help
Hmm. You're right. There's something missing in the tutorial. I'll check it out soon and update it
g
@w0wka91 it didn't work for me...
i had such error in the end
i tried to pass
secret
from dokku env variable and just hardcoded it into
prisma.yml
- nothing worked
And I always had this error (
[Metrics] No Prisma Cloud secret is set...
w
Your prisma server seems to be running?!
Are you trying to configure the managementApiSecret?
My dockerfile looks like this
Copy code
port: 4466
enableManagementApi: true
managementApiSecret: "mySecret"
databases:
    default:
        connector: postgres
        host: dokku-postgres-prisma-server-db
        port: 5432
        user: postgres
        password: e949e2f69ba5c6064474c59ef823882f
        migrations: true
        active: true
Sorry. i mean my config.yml
g
hm, i didn't have these lines: enableManagementApi: true managementApiSecret: "mySecret"
btw, i decided not to use dokku
too hard for me