Magento indexing is failing, SQLSTATE[23000]: Integrity constraint violation

it seams that you have zombie data in the flat table for store with id 1.
The prepareFlatTable method is trying to add a Foreign Key to the catalog_product_entity table and that fails.
Most probably because you already have in the catalog_product_flat_store_1 table a product id that is not in the catalog_product_entity table.

First backup your database (or at least catalog_product_flat_store_1 table), then truncate the table catalog_product_flat_store_1.

Or you can disable the usage of the flat catalog, remove the tables catalog_product_flat_store_*, re run the indexing then enable the usage of flat tables again.