lib/takeltau/ship/project/start.rb in takeltau-0.43.16 vs lib/takeltau/ship/project/start.rb in takeltau-0.43.19
- old
+ new
@@ -2,17 +2,18 @@
# tau ship project start
module ShipProjectStart
# Start a takelship
def ship_project_start(project)
- return false unless docker_check_daemon 'cmd_ship_docker'
-
return false if _docker_container_lib_check_matrjoschka
return false if ship_container_check_existing
takelship = _ship_info_lib_get_takelshipinfo
+
+ return false unless takelship.key? 'default_project'
+
project = config.active['ship_default_project'] if project == 'default'
project = takelship['default_project'] if project == 'default'
return false unless _ship_info_lib_valid_project? takelship, project
@@ -23,10 +24,11 @@
private
# Get takelship ports
# rubocop:disable Metrics/MethodLength
+ # rubocop:disable Metrics/AbcSize
def _ship_project_start_ports(takelship, project)
ports = []
takelship['projects'].each do |takelship_project|
next unless project == takelship_project['name']
@@ -36,11 +38,14 @@
service['ports'].each do |port|
ports << port['port']
end
end
end
- # add DOCKER_HOST port
- ports << config.active['ship_docker_host']
+ if config.active['ship_port_expose_podman_socket'] == 'true'
+ log.debug "Add DOCKER_HOST port #{config.active['ship_docker_host']}"
+ ports << config.active['ship_docker_host']
+ end
ports
end
end
+# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/MethodLength