What is launcher start-cmd suppose to do?

AI-generated summary

The launcher start-cmd command is used to generate the Docker command required to start a container. However, it requires a config parameter to specify the container to issue the command for. EricGT initially received the command help output instead of the expected Docker command because they didn’t provide the config. supermathie clarified that the config needs to be specified, e.g., ./launcher start-cmd app. After providing the config, EricGT was able to generate the Docker command, which includes environment variables and container settings.

The help for launcher has

Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Commands:
    start:       Start/initialize a container
   ...
    start-cmd:   Generate docker command used to start container
   ...

and since I know launcher is at times issuing Docker container commands I was expecting start-cmd to show the Docker command with all the parameters to start the container.

This was the result

groot@galaxy:/var/discourse$ ./launcher start-cmd
Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Commands:
    start:       Start/initialize a container
   ...

a dump of the command help.

How is this command used?

You still need to give it the config for which to issue the command, e.g.: ./launcher start-cmd app

Thanks.


groot@galaxy:/var/discourse$ sudo ./launcher start-cmd app
+ true run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_HOSTNAME=planet.galaxy.org  -e DISCOURSE_DEVELOPER_EMAILS=groot@galaxy.org -e DISCOURSE_SMTP_ADDRESS=smtp.mailgun.org -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=groot@mg.galaxy.org -e DISCOURSE_SMTP_PASSWORD=not_here -e LETSENCRYPT_ACCOUNT_EMAIL=groot@galaxy.org -h site-app -e DOCKER_HOST_IP= www.xxx.yyy.zzz --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address ab:cd:ef:gh:ij:kl local_discourse/app /sbin/boot

Obviously specific values were sanitized.