Easy, convert a nuclear powered aircraft carrier into a floating community. Ditch all the planes, keep some of the helicopters. Convert the majority of the top deck to a field for growing whatever crops you deem necessary (i.e. build a metre or so high metal 'wall' around the deck perimeter to keep soil in), and the internal hanger bay into a livestock pen, occasionally bringing up the different animals up to the top deck every once in a while for sunlight and the like. Stock as many medicines and the like possible, using the choppers manned by scavenger teams to go back to land to forage for special supplies, growing what you can on the ship. Park the ship a few miles off the coast, in deep water. Sorted.