Coder Social home page Coder Social logo

Comments (2)

timvisee avatar timvisee commented on July 18, 2024

I've been sitting for some time trying to get send working in docker. I started with installing redis-server on the Ubuntu docker host, assuming REDIR_HOST=localhost would work, but links expired when send container restarted. And since "docker logs sendcontainer" responds with absolute nothing I'm working completely in the dark. I however had a theory; redis-server listens on 127.0.0.1 on the host, and thereby doesn't accept connections from containers.

So I followed the instructions on https://github.com/timvisee/send/blob/master/docs/docker.md Examples (Run totally self-hosted...) and created a docker network, started a redis container (it's not called redis-server by the way). But the send run example doesn't specify where the redis host is, and my links still expired when restarting send container.

Before giving up I though i could test specifying REDIS_HOST=172.19.0.2 (the redis container ip address), and behold, the links doesn't expire when restarting send! But I feel this 172 address could change any time?

This sounds like a Redis connection issue, yes. If you'd like to set this up yourself, I recommend to use the 'default' Redis container provided via Docker. Containers are immutable by default, meaning some extra configuration is required to ensure no data is lost when the container stops.

Note that the page you linked purely lists how to start a Send container, and doesn't explain how to set up Redis. Redis is not a requirement when running in development mode.

Question 1: How is containerized send supposed to connect to redis when a) redis is running on the host, and b) running in a container on the same docker network?

If the two services are running within the same Docker network, they should be able to connect. If Redis is running on your host, and Send is running in the container, you may expose Redis to the container or choose to use the host network all together within Send as well.

Question 2: If redis is a requirement, why isn't it included in the docker image?

This is common Docker practice, to run each service in it's own container. This makes the whole thing modular, better allowing updates, different configurations and proper handling of crashes.


Docker can be somewhat confusing when setting things up manually.

I therefore highly recommend to look into the send-docker-compose example I've set up instead. Through Docker compose, it sets up the Send stack with all requirements for you.

Sorry for my late message. I somehow missed this.

from send.

timvisee avatar timvisee commented on July 18, 2024

Closing this. Feel free to open it again if further issues arise.

from send.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.