1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- version: "3"
- services:
- db:
- image: postgres:13.2-alpine
- volumes:
- - ./data/db:/var/lib/postgresql/data
- environment:
- - POSTGRES_DB=postgres
- - POSTGRES_USER=postgres
- - POSTGRES_PASSWORD=postgres
- ports:
- - 5432:5432
- cache:
- image: redis:6.2-alpine
- ports:
- - 6379:6379
- broker:
- image: rabbitmq:3.8-management-alpine
- volumes:
- - ./data/broker:/var/lib/rabbitmq
- environment:
- - RABBITMQ_DEFAULT_USER=rabbitmq
- - RABBITMQ_DEFAULT_PASS=rabbitmq
- ports:
- - 5672:5672
- - 15672:15672
- web:
- build:
- context: .
- dockerfile: Dockerfile
- volumes:
- - .:/app
- - ./media:/media
- ports:
- - "8000:8000"
- environment:
- - DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
- - REDIS_URL=redis://cache:6379/0
- - CELERY_BROKER_URL=amqp://rabbitmq:rabbitmq@broker:5672/
- env_file:
- - .env
- depends_on:
- - db
- - cache
- - broker
- nginx:
- image: nginx:alpine
- volumes:
- - ./data/static:/static # Путь к статическим файлам
- - ./nginx.conf:/etc/nginx/nginx.conf # Ваш файл конфигурации Nginx
- ports:
- - "80:80"
- depends_on:
- - web
|