ec2 celery run 에러

hyuckhoon.ko·2021년 2월 23일
0

What I learned in first year

목록 보기
74/146

celery run 에러

sudo docker run --rm -d 75f4f28fa8ad celery -A app worker --loglevel=info -E

sudo docker run --rm -d 9b02d545a431 celery -A app beat -l info --pidfile= --scheduler django_celery_beat.schedulers:DatabaseScheduler

sudo docker ps -a 에 실행중인 컨테이너가 확인되지 않는다면
sudo docker run --rm 75f4f28fa8ad celery -A app worker --loglevel=info -E 와 같이 -d 디태치 모드를 해제하고 실행시켜본다.

.env

self._setup()
File "/usr/local/lib/python3.8/site-packages/django/conf/init.py", line 70, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python3.8/site-packages/django/conf/init.py", line 177, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/app/app/settings.py", line 17, in
SECRET_KEY = config('SECRET_KEY')
File "/usr/local/lib/python3.8/site-packages/decouple.py", line 199, in call
return self.config(args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/decouple.py", line 83, in call
return self.get(
args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/decouple.py", line 68, in get
raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))
decouple.UndefinedValueError: SECRET_KEY not found. Declare it as envvar or define a default value.

0개의 댓글