dokku shit

This commit is contained in:
Trey t
2023-06-26 11:00:11 -05:00
parent 8c049324a3
commit 554c37765a
9 changed files with 6 additions and 22 deletions

View File

@@ -40,7 +40,7 @@ services:
restart: always restart: always
build: build:
context: . context: .
command: celery -A werkout worker -l info command: celery -A werkout_api worker -l info
volumes: volumes:
- .:/code - .:/code
environment: environment:

View File

@@ -1,3 +1,3 @@
web: daphne werkout_api.asgi:application --port 5000 --bind 0.0.0.0 -v2 web: daphne werkout_api.asgi:application --port 5000 --bind 0.0.0.0 -v2
beat: /usr/local/bin/celery -A werkout beat -linfo 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

View File

@@ -1,5 +1,6 @@
amqp==5.1.1 amqp==5.1.1
asgiref==3.7.2 asgiref==3.7.2
async-timeout==4.0.2
billiard==4.1.0 billiard==4.1.0
celery==5.3.1 celery==5.3.1
click==8.1.3 click==8.1.3
@@ -24,6 +25,7 @@ psycopg2==2.9.6
python-dateutil==2.8.2 python-dateutil==2.8.2
pytz==2023.3 pytz==2023.3
PyYAML==6.0 PyYAML==6.0
redis==4.6.0
six==1.16.0 six==1.16.0
sqlparse==0.4.4 sqlparse==0.4.4
tablib==3.5.0 tablib==3.5.0

View File

@@ -1,8 +1,8 @@
import os import os
from celery import Celery 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.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks() app.autodiscover_tasks()

View File

@@ -158,15 +158,6 @@ if os.environ.get("DATABASE_URL"):
CELERY_BROKER_URL = os.environ.get("REDIS_URL", "") + "/1" CELERY_BROKER_URL = os.environ.get("REDIS_URL", "") + "/1"
CELERY_RESULT_BACKEND = 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 = [ INTERNAL_IPS = [
"127.0.0.1", "127.0.0.1",
] ]
@@ -185,15 +176,6 @@ else:
CELERY_BROKER_URL = "redis://redis:6379" CELERY_BROKER_URL = "redis://redis:6379"
CELERY_RESULT_BACKEND = "redis://redis:6379" CELERY_RESULT_BACKEND = "redis://redis:6379"
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels_redis.core.RedisChannelLayer',
'CONFIG': {
'hosts': [('redis', 6379)],
}
}
}
INTERNAL_IPS = [ INTERNAL_IPS = [
"127.0.0.1", "127.0.0.1",
] ]