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

Feature/add rabbitmq consumer timeout and fix http proxy support for django #3455

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# ----------------------------------------------------------------------------
SUBMISSION_TEMP_DIR=/tmp/codalab

# ----------------------------------------------------------------------------
# HTTP proxy support
# ----------------------------------------------------------------------------
#HTTP_PROXY=http://proxy-host:port
#HTTPS_PROXY=http://proxy-host:port
#NO_PROXY=127.0.0.0/8,10.0.0.0/8,172.0.0.0/8


# ----------------------------------------------------------------------------
# Storage
Expand Down Expand Up @@ -94,6 +101,7 @@ RABBITMQ_DEFAULT_PASS=guest
RABBITMQ_HOST=rabbit
RABBITMQ_PORT=5672
RABBITMQ_MANAGEMENT_PORT=15672
#WORKER_CONNECTION_TIMEOUT=100000000 # milisecond
FLOWER_BASIC_AUTH=root:password
FLOWER_PORT=5555

Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2'
version: '3'
services:
# --------------------------------------------------------------------------
# HTTP Server
Expand Down Expand Up @@ -58,6 +58,7 @@ services:
environment:
- RABBITMQ_LOGS=/var/log/rabbitmq/output.log
- RABBITMQ_SASL_LOGS=/var/log/rabbitmq/output_sasl.log
- WORKER_CONNECTION_TIMEOUT="${WORKER_CONNECTION_TIMEOUT:-100000000}"
env_file: .env
volumes:
- ./docker:/app/docker
Expand Down
1 change: 1 addition & 0 deletions docker/rabbitmq/rabbitmq.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
{rabbit, [
{consumer_timeout, ${WORKER_CONNECTION_TIMEOUT}},
{tcp_listeners, [{"::", ${RABBITMQ_PORT}}]},
{loopback_users, []}
]},
Expand Down
5 changes: 5 additions & 0 deletions docker/run_django.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ python scripts/initialize_from_fixture.py

python manage.py loaddata initial_data.json initialize_site.json initial_team_data.json

# Django needs to remove http proxy variables for working
unset HTTP_PROXY
unset HTTPS_PROXY
unset NO_PROXY

# start development server on public ip interface, on port 8000
PYTHONUNBUFFERED=TRUE gunicorn codalab.wsgi \
--bind django:$DJANGO_PORT \
Expand Down
Loading