A photonic analog of the Josephson effect is analyzed for a system formed by a partly transparent mechanical membrane dividing an optical cavity into two halves. Photons tunneling between the two sub-cavities constitute the coherent Jospehson current. The force acting upon the membrane due to the light pressure induces a nonlinearity which results in a rich dynamical structure. For example, contrary to standard bosonic Josephson systems, we encounter chaos. By means of a mean-field approach we identify the various regimes and corresponding phase diagram. At the short time scale, chaos is demonstrated to prevent regular self-trapping, while for longer times a dissipation induced self-trapping effect is possible. [5], and in nonlinear optics [6]. Lately, the possibility to observe the Josephson effect for photons in systems of coupled high Q optical cavities has been discussed [7,8]. Together with related schemes containing arrays of coupled cavities [9] or single cavities filled with a Kerr medium [10], these proposals pave the way for genuine quantum many-body models to be studied by means of photons.