Code4SA / aleph

Sift through large sets of structured and unstructured data, and find the people and companies you look for.
https://data.occrp.org
0 stars 6 forks source link

Dokku deploy directly #16

Closed jbothma closed 7 years ago

jbothma commented 7 years ago

dockerfile changes to support deploying directly from this aleph fork

hopefully temporary til we figure out how to customise upstream without forking

jbothma commented 7 years ago

I made another base image layer with the python deps because building and installing all these python deps is still slow and annoying. Now that this works we can move towards it if we need to.

jbothma commented 7 years ago

That explains a lot. I copied this before pulling your changes to aleph-dokku. It used to be on 8000 because I just copied from something in aleph and then fixed it with dokku proxy config but I couldn't find that proxy config on dokku4. Finally it makes sense :)

If gunicorn will default to 5000 and listen on the right interface I'll change to simplify the dockerfile. Kinda feel it works don't touch it :)

On 12 October 2016 at 19:48, Greg Kempe notifications@github.com wrote:

@longhotsummer commented on this pull request.

In Dockerfile https://github.com/Code4SA/aleph/pull/16#pullrequestreview-3925993:

COPY . /aleph WORKDIR /aleph ENV ALEPH_SETTINGS /aleph/contrib/docker_settings.py -RUN pip install -q -e /aleph -RUN rm -rf /aleph/.git && bower --allow-root --quiet install +RUN pip install git+git://github.com/Code4SA/aleph_zagazettecrawler.git && \

  • pip install -q -e /aleph && \
  • rm -rf /aleph/.git && \
  • bower --allow-root --quiet install + +CMD newrelic-admin run-program gunicorn --workers 1 -b 0.0.0.0:5000 --worker-class gevent --timeout 600 --max-requests 3000 --max-requests-jitter 100 --log-file - --access-logfile - aleph.manage:app

It shouldn't be necessary to tell gunicorn what port or IP to bind to. This caused me problems last time, because dokku thought it bound to another port. I think we should let it use the defaults.

Here's the line from our old dokku:

CMD newrelic-admin run-program gunicorn --workers 1 --worker-class gevent --timeout 600 --max-requests 3000 --max-requests-jitter 100 --log-file - --access-logfile - aleph.manage:app

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Code4SA/aleph/pull/16#pullrequestreview-3925993, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOZGXc_NzIzDC0yYgYAHLHwdnc4vYUfks5qzR1sgaJpZM4KUnHg .