Git Product home page Git Product logo

Comments (8)

factorone avatar factorone commented on June 15, 2024 1

@karimcitoh Short of turning this into a support forum (apologies to @MarshallOfSound for this), I'm at a loss as to what else needs to be done, as I've scoured as much of the internet as I can in 2 days to figure this out without having it be shown to me directly, and I'm nowhere closer than I was before to getting Redis to play with Nucleus.

I've got Redis up and running in its own container with the default config that comes from the Docker repo, and I've setup the Docker compose file for both Redis and Nucleus as such:

version: "3"

volumes:
  redis_data:
  nucleus_data:

services:

  redis:
    image: redis:latest
    ports:
      - 6379:6379
    volumes:
      - redis_data:/data
    command: redis-server --appendonly yes 
    networks:
      - redis_net
    deploy:
      restart_policy:
        condition: on-failure
        delay: 2s

  nucleus:
    image: maestroinc/nucleus:prod
    ports:
      - "80:3030"
      - "443:3030"
      - "9999:9999"
    volumes:
      - nucleus_data:/opt/service
    networks:
      - redis_net
    depends_on:
      - redis
    deploy:
      restart_policy:
        condition: on-failure
        delay: 2s
    environment:
      NODE_ENV: production
      REDIS_KEY: [ key ]

networks:
  redis_net:

This is my Nucleus config for Redis:

sessionConfig: {
  type: 'redis',
  secret: process.env.REDIS_KEY,

  redis: {
    host: 'localhost',
    port: '6379'
  }
},

I know the answer to this is probably stupid simple, but there is literally nowhere else out there with any kind of insight into this issue and I'm losing my mind trying to get this working.

from nucleus.

factorone avatar factorone commented on June 15, 2024

I'm also encountering this problem, and I suspect that it's related to the base URL for the static file location being the same as the URL for Nucleus in general. While I don't have this problem on my dev instance of Nucleus (localhost), I'm encountering it on the server I'm attempting to spin it up on for production in AWS.

from nucleus.

MarshallOfSound avatar MarshallOfSound commented on June 15, 2024

@karimcitoh @factorone If I had to guess your redis configuration is invalid so the sessions aren't being persisted anywhere. That would force you into an infinite login loop

from nucleus.

factorone avatar factorone commented on June 15, 2024

It's definitely related to Nucleus not being able to talk to Redis and vice versa. My guess is I'm not setting the right address for Redis in my Forge config. Since I've got Redis installed directly in my EC2 instance with Nucleus in a Docker container, what's your recommendation for the URL value of Redis in the Forge config (DevOps isn't my strong suit currently, so forgive my ignorance)?

from nucleus.

MarshallOfSound avatar MarshallOfSound commented on June 15, 2024

Since I've got Redis installed directly in my EC2 instance with Nucleus in a Docker container

I would recommend running redis in a docker container as well and linking the two containers together so that the nucleus container can connect to the redis container.

from nucleus.

karimcitoh avatar karimcitoh commented on June 15, 2024

Alright! I managed to solve this by creating a compose file and properly configuring nucleus. This is not an issue anymore.

version: '2.2'
volumes:
  nucleus_data:
  redis_data:
services:
  nucleus:
    build: "docker/nucleus"
    ports:
      - 8987:8987
      - 8988:8988
    links:
      - redis:redis
    volumes:
      - nucleus_data:/opt/service
  redis:
    image: redis
    ports:
      - 6379:6379
    volumes:
      - redis_data:/data

from nucleus.

sayederfanarefin avatar sayederfanarefin commented on June 15, 2024

Hello,

I hope you are doing well. I am having an issue with the docker deployment.

This is my docker-compose:

version: "2.2"
volumes:
  nucleus_data:
  redis_data:

services:
  myapp:
    build: .
    container_name: nucleus
    restart: always
    ports:
      - 8888:8888
      - 8080:8080
      - 9999:9999
    links:
      - redis:redis
    volumes:
      - nucleus_data:/opt/service

  redis:
    image: redis
    volumes:
      - ./redis.conf:/usr/local/etc/redis/redis.conf
      - redis_data:/data
    restart: always
    ports:
      - 6379:6379

and my config.js file redis section:

  sessionConfig: {
    type: "redis",
    // secret: 'FRt3PyQX1ltFw1IFV2ysBT4xYdWcKQgm',
    secret: '2eu22mCK6n4G4sr+zPAyZQh9+hCdtuPQGkMXAoF3MnEz4Z3HjRnYXzXbpuGPW/iocO85wO7Ru/v8pqO2',
    

    redis: {
      host: '0.0.0.0',
      port: '6379'
    }
  },

I am using nginx reverse proxy. It is pointing to 8080 of the docker container from 80 port.

and the base URL section of the config.js is:

module.exports = {
  /**
   * The port to run Nucleus Server on, if the port is in use the server will not start
   */
  port: 8080,

  /**
   * The fully qualified domain + path that Nucleus is being hosted at
   */
  baseURL: 'https://download.blablabla.com:80',


// ....................
}

I am stuck in login loop. I do not know how to proceed. Can you help please?

from nucleus.

sayederfanarefin avatar sayederfanarefin commented on June 15, 2024

@MarshallOfSound

from nucleus.

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.