I am trying to connect to couchdb through the container but my app is not seeing it.
However if I use the external address
it works but I need a connection through network with the internal port
version: '3' services: couchdb: image: couchdb:latest restart: always volumes: - couchdb-data-volume:/usr/local/var/lib/couchdb env_file: .env.docker ports: - "12345:5986" networks: app-net: aliases: - couchdb app: build: . image: app restart: always depends_on: - couchdb env_file: .env.docker networks: app-net: driver: bridge volumes: couchdb-data-volume:
NODE_ENV=production COUCHDB_SERVER=http://user:pass@couchdb:5986 COUCHDB_USER=user COUCHDB_PASSWORD=pass
I Also tried links instead of networks but the same issue.
links: - couchdb
Any Ideas ?