No, you should never fill a raised bed with only compost. It should account for 30-50% of your garden soil when creating a soil blend for your raised beds. While compost will give your plants plenty of nutrients, the soil will drain away too quickly, washing away the nutrients, causing your plants to starve.