这是我已经完成的步骤
prisma init
我在本地(不存在)中为数据库设置了 postgresql。
它创建了 3 个文件,datamodel.graphql、docker-compose.yml、prisma.yml
docker-compose up -d
我确认它运行成功
但是如果我打电话prisma deploy
,它会告诉我错误
Could not connect to server at http://localhost:4466. Please check if your server is running.
我所做的只是手册中描述的标准操作,并且在 https://www.prisma.io/docs/tutorials/deploy-prisma-servers/local-(docker)-meemaesh3k中没有自定义
这是 docker-compose.yml
version: '3'
services:
prisma:
image: prismagraphql/prisma:1.11
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: postgres
host: localhost
port: '5432'
database: databasename
schema: public
user: postgres
password: root
migrations: true
我错过了什么?