Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using docker-compose & redis on nodejs #1121

Open
Kristoffer95 opened this issue May 6, 2020 · 2 comments
Open

Using docker-compose & redis on nodejs #1121

Kristoffer95 opened this issue May 6, 2020 · 2 comments

Comments

@Kristoffer95
Copy link

I am following this tutorial: https://youtu.be/th-KXdI8HDU?list=PLcCp4mjO-z9_HmJ5rSonmiEGfP-kyRMlI&t=868

Using ts-node version 8.10.1, typescript version 3.8.3
http://localhost:3000

[ioredis] Unhandled error event: Error: write EPIPE
    at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: write EPIPE
    at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: write EPIPE
    at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: write EPIPE
    at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: write EPIPE
    at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
@Adizbek
Copy link

Adizbek commented May 24, 2020

Can you show your docker-compose.yml ?

@ulises-castro
Copy link

Hi, I was facing this issue and I was able to solve just changing my command line inside of the docker-compose file from:

version: '3.8'

services:
  redis:
    container_name: redis_container
    image: redis:6.0.7
    command: redis-server /usr/local/etc/redis/redis.conf
    volumes:
      - redis_data:/var/lib/redis
      - ./redis/redis.conf:/usr/local/etc/redis/redis.conf
    ports:
      - "6379:6379"

To this, and It can now connect to my dockerized redis from my host (computer)

services:
  redis:
    container_name: redis_container
    image: redis:6.0.7
    command: ['--requirepass "password"']  
    volumes:
      - redis_data:/var/lib/redis
      - ./redis/redis.conf:/usr/local/etc/redis/redis.conf
    ports:
      - "6379:6379"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants