我正试图通过后台创建一个对接者映像,并使用Heroku部署它。后台的默认DB是SQLlite3,但我在Heroku.Should中使用PostgreSQL,我在应用程序创建期间使用后台创建的DOCKERFILE中的任何PostgreSQL依赖项。在这里输入图像描述
发布于 2022-07-04 10:22:08
您不需要安装postgres依赖项。您只需要在app-config.yaml中正确配置Postgres。
发布于 2022-10-25 14:51:52
你去过这个文档吗?
简言之:
yarn add --cwd packages/backend pgbackend:
database:
- client: better-sqlite3
- connection: ':memory:'
+ # config options: https://node-postgres.com/api/client
+ client: pg
+ connection:
+ host: ${POSTGRES_HOST}
+ port: ${POSTGRES_PORT}
+ user: ${POSTGRES_USER}
+ password: ${POSTGRES_PASSWORD}
+ # https://node-postgres.com/features/ssl
+ # you can set the sslmode configuration option via the `PGSSLMODE` environment variable
+ # see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require)
+ # ssl:
+ # ca: # if you have a CA file and want to verify it you can uncomment this section
+ # $file: <file-path>/ca/server.crt
``https://stackoverflow.com/questions/72829534
复制相似问题