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

Set Hosts By One IP And Multiple Ports #117

Open
mohsenjavidpanah opened this issue May 29, 2018 · 0 comments
Open

Set Hosts By One IP And Multiple Ports #117

mohsenjavidpanah opened this issue May 29, 2018 · 0 comments

Comments

@mohsenjavidpanah
Copy link

mohsenjavidpanah commented May 29, 2018

Hi

I want run multiple docker container of Cassandra on the another machine by separate ports, How can I set this in Django DATABASES settings? below Cassandra HOST config is OK?

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'USER': 'postgres',
        'PASSWORD': 'DATABASE_PASSWORD',
        'NAME': 'DATABASE_NAME',
        'HOST': 'DATABASE_HOST', '127.0.0.1',
        'PORT': '5432',
    },
    'cassandra': {
        'ENGINE': 'django_cassandra_engine',
        'NAME': 'mykeyspace',
        'HOST': '192.168.132.1:7000,192.168.132.1:7001,192.168.132.1:7002,192.168.132.1:7003',
        'USER': 'CASSANDRA_USER',
        'PASSWORD': 'CASSANDRA_PASSWORD',
        'OPTIONS': {
            'replication': {
                'strategy_class': 'SimpleStrategy',
                'replication_factor': 1
            }
        },
        'connection': {
            'consistency': ConsistencyLevel.ALL,
            'lazy_connect': True,
            'retry_connect': True,
            'port': 9042
        }
    }
}

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

1 participant