Files
links/docker-compose.yml
T
2025-11-04 20:15:43 +11:00

57 lines
1.2 KiB
YAML

version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile.local
image: web-local-image
command: >
bash -c "uv sync --no-dev && uv run python manage.py migrate &&
uv run python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app
- venv:/app/.venv
- ./data/media:/app/data/media
ports:
- "8000:8000"
env_file:
- .env
environment:
- DJANGO_SETTINGS_MODULE=core.settings
restart: unless-stopped
networks:
- app-network
node:
image: web-local-image
command: >
bash -c "
npm install &&
uv pip install --system django-tailwind &&
uv run python manage.py tailwind install &&
uv run python manage.py tailwind start"
volumes:
- .:/app
- venv:/app/.venv
- node_modules:/app/node_modules
environment:
- DJANGO_SETTINGS_MODULE=core.settings
- PYTHONPATH=/app
- UV_CACHE_DIR=/app/.cache/uv
depends_on:
web:
condition: service_started
networks:
- app-network
tty: true
stdin_open: true
volumes:
venv:
node_modules:
networks:
app-network:
driver: bridge