As Colin Fine indicated, the language here is metaphorical. The “deity” is alcoholic drink (as indicated by a demi-john, a large jug once frequently used to hold liquor). “To hold court” refers here to the court of a sovereign or deity. In short, liquor ruled.
The “aft” and “forward” refer to the rear and front of a ship or boat respectively. In sailing ships, crew were housed in the front, “before the mast,” whereas officers and important passengers were housed at the rear.
The implication is that the officers were definitely drunk and the crew likely were as well.