Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Successful in 1m47s
CI/CD Pipeline / Run Tests (push) Failing after 2m4s
CI/CD Pipeline / Build & Push Images (push) Successful in 17s
CI/CD Pipeline / Deploy (prod) (push) Has been skipped
CI/CD Pipeline / Deploy (dev) (push) Successful in 14s
- Use external postgres and redis from services_default network - Remove db/redis containers from deploy commands Co-Authored-By: Warp <agent@warp.dev>
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
services:
|
|
web:
|
|
image: 10.10.0.10:3000/avm/mostovik-web:${IMAGE_TAG:-dev}
|
|
container_name: mostovik_web
|
|
restart: unless-stopped
|
|
networks:
|
|
- services_default
|
|
environment:
|
|
- DEBUG=False
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- POSTGRES_HOST=postgres
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_DB=mostovik
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- CELERY_BROKER_URL=redis://redis:6379/0
|
|
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./media:/app/media
|
|
- ./staticfiles:/app/staticfiles
|
|
ports:
|
|
- "8000:8000"
|
|
command: >
|
|
sh -c "python src/manage.py migrate &&
|
|
python src/manage.py collectstatic --noinput &&
|
|
gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3"
|
|
|
|
celery_worker:
|
|
image: 10.10.0.10:3000/avm/mostovik-celery:${IMAGE_TAG:-dev}
|
|
container_name: mostovik_celery_worker
|
|
restart: unless-stopped
|
|
networks:
|
|
- services_default
|
|
environment:
|
|
- DEBUG=False
|
|
- POSTGRES_HOST=postgres
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_DB=mostovik
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- CELERY_BROKER_URL=redis://redis:6379/0
|
|
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
command: celery -A config worker --loglevel=info
|
|
|
|
celery_beat:
|
|
image: 10.10.0.10:3000/avm/mostovik-celery:${IMAGE_TAG:-dev}
|
|
container_name: mostovik_celery_beat
|
|
restart: unless-stopped
|
|
networks:
|
|
- services_default
|
|
environment:
|
|
- DEBUG=False
|
|
- POSTGRES_HOST=postgres
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_DB=mostovik
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- CELERY_BROKER_URL=redis://redis:6379/0
|
|
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
command: celery -A config beat --loglevel=info --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
|
|
|
networks:
|
|
services_default:
|
|
external: true
|