Ctrl K
ComunidadGuías…

docker-compose.yml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
services:
  db:
    image: postgres:17
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 5
    environment:
      POSTGRES_PASSWORD: postgres
    volumes:
      - ./docker-postgres-data:/var/lib/postgresql/data
    ports:
      - "5432:5432"
  web:
    build: .
    command: >
      sh -c "uv run --active python manage.py migrate &&
             uv run --active python manage.py collectstatic --noinput &&
             uv run --active python manage.py runserver 0.0.0.0:8000"
    environment:
      DEBUG: 1
      LOCALDEV: 1
      DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
    volumes:
      - .:/app
    ports:
      - "8000:8000"
    depends_on:
      db:
        condition: service_healthy