Dynavera/compose/dev/docker-compose.yml
2025-12-10 13:44:16 +00:00

63 lines
1.4 KiB
YAML

services:
fyp-redis:
image: redis:7-alpine
container_name: fyp-redis
ports:
- "0.0.0.0:6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
web:
build:
context: ../..
dockerfile: compose/dev/node/Dockerfile
environment:
NODE_ENV: development
ports:
- "0.0.0.0:5173:5173"
volumes:
- ../../src:/app/src
- ../../index.html:/app/index.html
- ../../vite.config.ts:/app/vite.config.ts
- ../../tsconfig.json:/app/tsconfig.json
api:
build:
context: ../..
dockerfile: compose/dev/python/Dockerfile
ports:
- "0.0.0.0:8000:8000"
volumes:
- ../../:/app:cached
- ../../build:/app/build
environment:
DJANGO_CELERY_BROKER_URL: redis://fyp-redis:6379/0
DJANGO_SETTINGS_MODULE: config.settings
depends_on:
fyp-redis:
condition: service_healthy
celery:
build:
context: ../..
dockerfile: compose/dev/celery/Dockerfile
command: celery -A config worker -l info
volumes:
- ../../:/app:cached
- ${USERPROFILE}/.cache/gpt4all:/root/.cache/gpt4all:ro
environment:
DJANGO_CELERY_BROKER_URL: redis://fyp-redis:6379/0
DJANGO_SETTINGS_MODULE: config.settings
depends_on:
fyp-redis:
condition: service_healthy
volumes:
redis_data: