This paper studies a joint communication and sensing (JCAS) system with downlink communication and multi-static sensing for single-target detection in a cloud radio access network architecture. A centralized operation of cell-free massive MIMO is considered for communication and sensing purposes. The JCAS transmit access points (APs) jointly serve the user equipments (UEs) and optionally steer a beam towards the target. A maximum a posteriori ratio test detector is derived to detect the target using signals received at distributed APs. We propose a power allocation algorithm to maximize the sensing signal-to-noise ratio under the condition that a minimal signal-to-interference-plus-noise ratio value for each UE is guaranteed. Numerical results show that, compared to the fully communication-centric power allocation, the detection probability under a certain false alarm probability can be increased significantly by the proposed algorithm for both JCAS setups: i) using additional sensing symbols or ii) using only existing communication symbols.