The unstructured mesh, discontinuous Galerkin finite element discretisation based coastal ocean model, Thetis, has been extended to include non-hydrostatic (buoyancy-driven and free surface) dynamics. Two alternative approaches to achieve this are described in this work. The first (a 3D based algorithm) makes use of prismatic element based meshes and uses a split-step pressure projection method for baroclinic and barotropic modes, while the second (a 2D based algorithm) adopts a novel multi-layer approach to convert a 3D problem into a combination of multiple 2D computations with only 2D triangle meshes required. Model development is carried out at high-level with the Firedrake library, using code generation techniques to automatically produce low-level code for the discretised model equations in an efficient and rapid manner. Through comparisons against several barotropic/baroclinic test cases where non-hydrostatic effects are important, the implemented approaches are verified and validated, and the proposed algorithms compared. Depending on whether the problems are dominated by dispersive, baroclinic or barotropic features, recommendation are given over the use of full 3D or multi-layer 2D based approaches to achieve optimal computational accuracy and efficiency. It is demonstrated that while in general the 2D approach is well-suited for barotropic problems and dispersive free surface waves, the 3D approach is more advantageous for simulating baroclinic buoyancy-driven flows due in part to the high vertical resolution typically required to represent the active tracer fields.