cellog opened a new issue #125: need help: connection always refused inside container, works outside URL: https://github.com/apache/couchdb-docker/issues/125 <!--- Provide a general summary of the issue in the Title above --> This is a support request. I am completely at a loss to fix this issue, and perhaps you can at least direct me where to begin. I have a complex application which I would like to dockerize because it is very brittle on the host configuration, and controlling the environment will make this much easier. Here is the `docker-compose.yml` I am using: ```yaml version: "3.7" services: web: depends_on: - couch image: gregcello/greenwood:dev deploy: replicas: 1 restart_policy: condition: "on-failure" ports: - "3000:3000" - "3001:3001" - "3002:3002" - "3003:3003" - "8080:8080" secrets: - jwt couch: image: couchdb ports: - "5984:5984" volumes: - "../data:/opt/couchdb/data" - "../couchconf:/opt/couchdb/etc/local.d" secrets: jwt: file: jwt_secrets.js ``` I can confirm that both the data volume and configuration volume are populated. In addition, when I got to `http://localhost:5984/_utils/` fauxton pops up, I can create databases (I manually created _users, _replicators, and _global_changes), and verify couchdb installation works *except* for replication, which hangs until it fails. However, from within the app, connections to http://127.0.0.1:5984 are simply refused, and don't even show up in the log from `docker service logs greenwood_couch` so they aren't getting to the app at all. I ran `docker exec -it <containerid> /bin/bash` for couch, and verified that inside the container, the db is running and accepts connections. However, inside the greenwood app, all connections to localhost:5984 or 127.0.0.1:5984 are simply refused. If you see *anything* I can do to figure out the issue (which I suspect is in my use of docker?) I would appreciate it. Also, just to note, this is a development docker-compose, which I am using solely to get the data into the container so that I can populate the live serve volume. The docker-compose I plan to use in production is (this also doesn't work): ```yaml version: "3.7" services: web: depends_on: - couch image: gregcello/greenwood:latest deploy: replicas: 1 restart_policy: condition: "on-failure" ports: - "80:3000" - "3001:3001" - "443:3002" - "3003:3003" - "8080:8080" secrets: - jwt - key.pem - ca.pem - cert.pem networks: - greenwood couch: image: couchdb deploy: replicas: 1 restart_policy: condition: "on-failure" volumes: - "../data:/opt/couchdb/data" - "../couchconf:/opt/couchdb/etc/local.d" networks: - greenwood secrets: jwt: file: jwt_secrets.js key.pem: file: ../key.pem ca.pem: file: ../ca.pem cert.pem: file: ../cert.pem networks: greenwood: ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
