Tag: sequelize.js

docker-为nodeJS上的Postgres组成ECONNREFUSED

这个错误与ECONNREFUSED相同。 但是执行方式不同,我会在这里再提一个问题。 这是docker-compose.yml文件 version: '3' services: server: build: context: . volumes: # Mounts the project directory on the host to /app inside the container, # allowing you to modify the code without having to rebuild the image. – .:/app # Just specify a path and let the Engine create a volume. # Data present in […]

无法使用Sequelize的Docker Compose连接到Postgres容器

我无法从运行节点&Sequelize的单独的docker服务连接到默认的Postgres映像。 我假设我的容器安装不正确,也许我的连接信息也是不正确的,因为我当我运行docker-compose –build我无法连接到我的数据库使用连接信息: Host: 0.0.0.0 Port: 5432 User: guy Password: password Database: engauge 错误消息是 Unable to connect to the database: { SequelizeConnectionRefusedError: connect ECONNREFUSED 0.0.0.0:5432 at /usr/src/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:98:20 我正在运行一个看起来像这样的YML文件 version: '2' # specify docker-compose version # Define the services/containers to be run services: web: # name of the first service build: . # specify the directory […]