We establish the existence of a nontrivial and nonnegative solution for a double phase Dirichlet problem driven by a (p(z), q(z))-Laplacian operator plus a potential term. Our approach is variational, but the reaction term f need not satisfy the usual in such cases Ambrosetti-Rabinowitz condition