dokku shit
This commit is contained in:
@@ -40,7 +40,7 @@ services:
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
command: celery -A werkout worker -l info
|
||||
command: celery -A werkout_api worker -l info
|
||||
volumes:
|
||||
- .:/code
|
||||
environment:
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
web: daphne werkout_api.asgi:application --port 5000 --bind 0.0.0.0 -v2
|
||||
beat: /usr/local/bin/celery -A werkout beat -linfo
|
||||
worker: python3 manage.py runworker channel_layer -v2
|
||||
worker: /usr/local/bin/celery-A werkout_api worker -l info
|
||||
@@ -1,5 +1,6 @@
|
||||
amqp==5.1.1
|
||||
asgiref==3.7.2
|
||||
async-timeout==4.0.2
|
||||
billiard==4.1.0
|
||||
celery==5.3.1
|
||||
click==8.1.3
|
||||
@@ -24,6 +25,7 @@ psycopg2==2.9.6
|
||||
python-dateutil==2.8.2
|
||||
pytz==2023.3
|
||||
PyYAML==6.0
|
||||
redis==4.6.0
|
||||
six==1.16.0
|
||||
sqlparse==0.4.4
|
||||
tablib==3.5.0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import os
|
||||
from celery import Celery
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'werkout.settings')
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'werkout_api.settings')
|
||||
|
||||
app = Celery('werkout')
|
||||
app = Celery('werkout_api')
|
||||
app.config_from_object('django.conf:settings', namespace='CELERY')
|
||||
app.autodiscover_tasks()
|
||||
@@ -158,15 +158,6 @@ if os.environ.get("DATABASE_URL"):
|
||||
CELERY_BROKER_URL = os.environ.get("REDIS_URL", "") + "/1"
|
||||
CELERY_RESULT_BACKEND = os.environ.get("REDIS_URL", "") + "/1"
|
||||
|
||||
CHANNEL_LAYERS = {
|
||||
'default': {
|
||||
'BACKEND': 'channels_redis.core.RedisChannelLayer',
|
||||
"CONFIG": {
|
||||
"hosts": [os.environ.get('REDIS_URL', 'redis://localhost:6379')],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INTERNAL_IPS = [
|
||||
"127.0.0.1",
|
||||
]
|
||||
@@ -185,15 +176,6 @@ else:
|
||||
CELERY_BROKER_URL = "redis://redis:6379"
|
||||
CELERY_RESULT_BACKEND = "redis://redis:6379"
|
||||
|
||||
CHANNEL_LAYERS = {
|
||||
'default': {
|
||||
'BACKEND': 'channels_redis.core.RedisChannelLayer',
|
||||
'CONFIG': {
|
||||
'hosts': [('redis', 6379)],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INTERNAL_IPS = [
|
||||
"127.0.0.1",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user