Второй трай фикса celery

This commit is contained in:
2025-12-02 17:12:42 +03:00
parent 3388f787c7
commit 118c86a73c
4 changed files with 8 additions and 6 deletions

View File

@@ -2,7 +2,8 @@
# Django Settings # Django Settings
DEBUG=True DEBUG=True
ENVIRONMENT=development # ENVIRONMENT=development
DJANGO_ENVIRONMENT=development
DJANGO_SETTINGS_MODULE=dbapp.settings.development DJANGO_SETTINGS_MODULE=dbapp.settings.development
SECRET_KEY=django-insecure-dev-key-only-for-development SECRET_KEY=django-insecure-dev-key-only-for-development

View File

@@ -1,5 +1,6 @@
DEBUG=False DEBUG=False
ENVIRONMENT=production # ENVIRONMENT=production
DJANGO_ENVIRONMENT=production
DJANGO_SETTINGS_MODULE=dbapp.settings.production DJANGO_SETTINGS_MODULE=dbapp.settings.production
SECRET_KEY=django-insecure-dev-key-only-for-production SECRET_KEY=django-insecure-dev-key-only-for-production

View File

@@ -11,9 +11,9 @@ until PGPASSWORD=$DB_PASSWORD psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -c
done done
echo "PostgreSQL started" echo "PostgreSQL started"
# Ждем Redis # Ждем Redis (проверяем через Python, т.к. redis-cli не установлен)
echo "Waiting for Redis..." echo "Waiting for Redis..."
until redis-cli -h redis ping 2>/dev/null; do until python -c "import redis; r = redis.from_url('${CELERY_BROKER_URL}'); r.ping()" 2>/dev/null; do
echo "Redis is unavailable - sleeping" echo "Redis is unavailable - sleeping"
sleep 1 sleep 1
done done

View File

@@ -3,7 +3,7 @@ services:
# build: # build:
# context: ./dbapp # context: ./dbapp
# dockerfile: Dockerfile # dockerfile: Dockerfile
image: https://registry.geraltserv.ru/geolocation:latest image: registry.geraltserv.ru/geolocation:latest
env_file: env_file:
- .env.prod - .env.prod
depends_on: depends_on:
@@ -18,7 +18,7 @@ services:
# build: # build:
# context: ./dbapp # context: ./dbapp
# dockerfile: Dockerfile # dockerfile: Dockerfile
image: https://registry.geraltserv.ru/geolocation:latest image: registry.geraltserv.ru/geolocation:latest
env_file: env_file:
- .env.prod - .env.prod
entrypoint: ["/app/entrypoint-celery.sh"] entrypoint: ["/app/entrypoint-celery.sh"]