Skip to content

Commit 2ac88c1

Browse files
committed
fix: exclude rabbitmq.cookie with ignore
1 parent c75fc0d commit 2ac88c1

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,4 @@ yarn-error.log*
135135
lms/lmsweb/config.py
136136
db.sqlite
137137
vim.session
138+
devops/rabbitmq.cookie

devops/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ SCRIPT_FILE_PATH=$(readlink -f "${0}")
44
SCRIPT_FOLDER=$(dirname "${SCRIPT_FILE_PATH}")
55
MAIN_FOLDER="${SCRIPT_FOLDER}/.."
66

7-
echo "Asking for sudo to chown the rabbitmq cookie:"
8-
sudo chown "$USER:$USER" "$SCRIPT_FOLDER/rabbitmq.cookie"
7+
echo "Using sudo to remove the old erlang cookie"
8+
ERLANG_COOKIE_FILE="${SCRIPT_FOLDER}/rabbitmq.cookie"
9+
sudo rm -f "$ERLANG_COOKIE_FILE"
910

1011
echo "Running build on folder ${MAIN_FOLDER}"
1112
( cd "${MAIN_FOLDER}" && docker build -t lms . )

devops/rabbitmq.cookie

100644100755
File mode changed.

devops/start.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ else
77
echo "Using default dev variables"
88
fi
99

10-
1110
SCRIPT_FILE_PATH=$(readlink -f "${0}")
1211
SCRIPT_FOLDER=$(dirname "${SCRIPT_FILE_PATH}")
12+
ERLANG_COOKIE_FILE="${SCRIPT_FOLDER}/rabbitmq.cookie"
13+
14+
echo erlang_cookie=AAVyo5djdSMGIZXiwEQs3JeVaBx5l14z > "$ERLANG_COOKIE_FILE"
15+
chmod 600 "$ERLANG_COOKIE_FILE"
1316

1417
docker network create lms
1518

lms/lmstests/sandbox/config/celery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
CELERY_RABBITMQ_DEFAULT_USER = os.getenv('CELERY_RABBITMQ_DEFAULT_USER')
77
CELERY_RABBITMQ_DEFAULT_PASS = os.getenv('CELERY_RABBITMQ_DEFAULT_PASS')
88
CELERY_CHECKS_SANDBOX_VHOST = os.getenv('CELERY_CHECKS_SANDBOX_VHOST')
9-
CELERY_RABBITMQ_HOST = os.getenv('CELERY_RABBITMQ_HOST')
9+
CELERY_RABBITMQ_HOST = os.getenv('CELERY_RABBITMQ_HOST', 'localhost')
1010
CELERY_RABBITMQ_PORT = os.getenv('CELERY_RABBITMQ_PORT', 222)
1111

1212
broker_url = (f'amqp://{CELERY_RABBITMQ_DEFAULT_USER}:'

0 commit comments

Comments
 (0)