Comments (5)
Hi, @JakeChampion glad to hear you find this useful :) Looking at your docker-compose config, I'm wondering how exactly you've configured the rabbitmq connection string (CELERY_BROKER_URL
, or environment variable ALEPH_BROKER_URI
) in the settings.py config you are using. The 'docker' way of doing this would be to use container-to-container networking, using a string like amqp://guest:guest@rabbitmq:5672//
and to use expose
instead of ports
to expose the port 5672 only to the other docker containers.
from aleph.
Thanks for the help @pudo. I got the service working locally using what you mentioned. Here is my new, now working, docker-compose.yml file:
postgres:
image: postgres:9.4
volumes:
- "/opt/aleph/data/postgres:/var/lib/postgresql/data"
- "/opt/aleph/logs/postgres:/var/log"
environment:
POSTGRES_USER: aleph
POSTGRES_PASSWORD: aleph
POSTGRES_DATABASE: aleph
ports:
- "127.0.0.1:5439:5432"
elasticsearch:
image: elasticsearch:2.2.0
volumes:
- "/opt/aleph/data/elasticsearch:/usr/share/elasticsearch/data"
- "/opt/aleph/logs/elasticsearch:/var/log"
ports:
- "127.0.0.1:9201:9209"
# environment:
# ES_HEAP_SIZE: 4g
worker:
build: .
command: celery -A aleph.queue worker -c 10 -l INFO --logfile=/var/log/celery.log
links:
- postgres
- elasticsearch
- rabbitmq
volumes:
- "/:/host"
- "/opt/aleph/data:/opt/aleph/data"
- "/opt/aleph/logs/worker:/var/log"
environment:
C_FORCE_ROOT: 'true'
ALEPH_ELASTICSEARCH_URI: http://elasticsearch:9200/
ALEPH_DATABASE_URI: postgresql://aleph:aleph@postgres/aleph
POLYGLOT_DATA_PATH: /opt/aleph/data
TESSDATA_PREFIX: /usr/share/tesseract-ocr
ALEPH_BROKER_URI: amqp://guest:guest@rabbitmq:5672
env_file:
- aleph.env
beat:
build: .
command: celery -A aleph.queue beat -s /var/run/celerybeat-schedule
links:
- postgres
- elasticsearch
- rabbitmq
volumes:
- "/opt/aleph/logs/beat:/var/log"
- "/opt/aleph/run/beat:/var/run"
environment:
C_FORCE_ROOT: 'true'
ALEPH_ELASTICSEARCH_URI: http://elasticsearch:9200/
ALEPH_DATABASE_URI: postgresql://aleph:aleph@postgres/aleph
ALEPH_BROKER_URI: amqp://guest:guest@rabbitmq:5672
env_file:
- aleph.env
web:
build: .
command: gunicorn -w 5 -b 0.0.0.0:8000 --log-level info --log-file /var/log/gunicorn.log aleph.manage:app
ports:
- "13376:8000"
links:
- postgres
- elasticsearch
- rabbitmq
volumes:
- "/opt/aleph/logs/web:/var/log"
environment:
ALEPH_ELASTICSEARCH_URI: http://elasticsearch:9200/
ALEPH_DATABASE_URI: postgresql://aleph:aleph@postgres/aleph
ALEPH_BROKER_URI: amqp://guest:guest@rabbitmq:5672
env_file:
- aleph.env
rabbitmq:
image: rabbitmq
ports:
- 5672
I'm now trying to bypass the need for Google OAUTH, I hope it's as easy as swapping out SQS for RabbitMQ :)
from aleph.
Do you have access to any other form of OAuth? It's possible to hook into the login code to support other providers -- here's the code we're using at OCCRP:
@signals.handle_oauth_session.connect
def handle_google_oauth(sender, provider=None, session=None):
from aleph.model import Role
if 'investigativedashboard.org' not in provider.base_url:
return
me = provider.get('api/2/accounts/profile/')
user_id = 'idashboard:user:%s' % me.data.get('id')
role = Role.load_or_create(user_id, Role.USER,
me.data.get('display_name'),
email=me.data.get('email'),
is_admin=me.data.get('is_admin'))
session['roles'].append(role.id)
session['user'] = role.id
for group in me.data.get('groups', []):
group_id = 'idashboard:%s' % group.get('id')
group_role = Role.load_or_create(group_id, Role.GROUP,
group.get('name'))
session['roles'].append(group_role.id)
This needs to be made to load as a plugin module, using a distutils entrypoint to make sure the plugin gets loaded:
from setuptools import setup, find_packages
setup(
name='aleph_occrp',
version='0.2',
[...]
entry_points={
'aleph.init': [
'occrpext = aleph_occrp:register'
]
}
)
Otherwise this will fall back onto #52.
from aleph.
How's it going? :)
from aleph.
I don't have access to another form of OAuth, sorry.
from aleph.
Related Issues (20)
- BUG: 0.7.0-rc1 is crashing without brotli4j dependency HOT 1
- FEATURE: More flexible ingestion command HOT 2
- BUG: PDF Folders "unknown" HOT 2
- BUG: installation HOT 3
- BUG: creating a user twice via the CLI should error obviously HOT 1
- BUG: `aleph --version` doesn't output the version
- BUG: 'aleph.manage' has no attribute 'app' HOT 1
- BUG: Creating entities with certain date property values fails
- BUG: Adding files to entity sets breaks file previews HOT 1
- BUG: Install errors with AttributeError: module 'aleph:manage' has no attribute 'app' HOT 2
- FEATURE: Please bring back the FtM export for network diagrams HOT 1
- BUG: Aleph fails to ingest vCard files with custom phone number labels
- BUG: Expand API endpoint does not include referencing CallForTenders entities
- BUG: language used to describe email entities and email addresses is ambiguous HOT 1
- Adding a text processor to process entire documents? HOT 4
- BUG: AttributeError: module 'aleph.manage' has no attribute 'app' on 3.15.5 HOT 1
- BUG: Enable prometheus metrics HOT 14
- Creating custom FTM schemas and/or extending existing HOT 1
- FEATURE: Remove references to convert-document from Technical FAQ HOT 6
- GitHub Actions issues
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aleph.