services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: directus POSTGRES_DB: directus POSTGRES_PASSWORD: directus-password volumes: - postgres_data:/var/lib/postgresql/data restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U directus"] interval: 10s timeout: 5s retries: 5 directus: image: directus/directus:11.2.1 ports: - "8055:8055" environment: KEY: change-me-to-random-string SECRET: change-me-to-another-random-string DB_CLIENT: pg DB_HOST: postgres DB_PORT: 5432 DB_USER: directus DB_DATABASE: directus DB_PASSWORD: directus-password ADMIN_EMAIL: admin@example.com ADMIN_PASSWORD: admin-password-123 CORS_ENABLED: "true" CORS_ORIGIN: "*" PUBLIC_URL: http://localhost:8055 volumes: - directus_uploads:/directus/uploads - directus_extensions:/directus/extensions depends_on: postgres: condition: service_healthy restart: unless-stopped volumes: postgres_data: directus_uploads: directus_extensions: