El comando del lanzador en la carpeta /var/discourse no es autoexplicativo

Tuve que cambiar y volver a cargar la configuración varias veces para solucionar problemas del servicio de correo de Siteground. Existen varios consejos sobre cómo hacerlo de la manera más rápida.
Resumirlos todos genera confusión.
¿Podrías explicarme con más detalle las diferencias entre los comandos listados a continuación?

La información en la guía de instalación y las publicaciones en este foro son de alguna manera inconsistentes. No está del todo claro, por ejemplo, cuál es la diferencia entre inicializar y construir un contenedor.
Debería existir una escalera de escalación que indique qué acciones requieren qué comando si modificas, por ejemplo, el archivo app.yml, ya que algunos dicen que start es suficiente, mientras que otros indican que debes usar rebuild o también ejecutar ./discourse-setup.

Comandos:
    start:      Iniciar/inicializar un contenedor
    stop:       Detener un contenedor en ejecución
    restart:    Reiniciar un contenedor
    destroy:    Detener y eliminar un contenedor
    bootstrap:  Inicializar un contenedor para la configuración basada en una plantilla
    rebuild:    Reconstruir un contenedor (destruir el antiguo, inicializar, iniciar el nuevo)

Estoy formando lentamente la impresión de que todos los comandos son una secuencia de acciones consecutivas.
Cada paso o comando sucesivo realiza lo mismo que su predecesor más algo adicional.

Por ejemplo, algo como esto:

  1. Inicio

    1. bootstrap: destruir el antiguo + inicializar un contenedor para la configuración basada en una plantilla
    2. rebuild: bootstrap + reconstruir un contenedor (iniciar el nuevo), lo que implica tareas como descargar las últimas versiones del software e implementar la configuración actualizada
    3. start: inicializar, lo que quiera que signifique
  2. Detención

    1. stop: Detener un contenedor en ejecución
    2. restart: Reiniciar un contenedor (incluye stop)
    3. destroy: Detener y eliminar un contenedor
2 Me gusta

I am not sure I am following here… can you make a PR with your proposed change?

1 me gusta

I going to do a PR on GitHub but I need to understand each command in detail what is currently not the case.

Could you tell me, what each command triggers? I’ve read many posts in this regard but the information is not consistence.
A good example is start. Once it is said it is just used to stop and start the container if e.g. doing something on the host. In another topic it is mentioned that it initializes a container, whatever initialize means :confused:

Initialize means that if no container exists it will be created. If you stop and start, you’ll stop and start the same container with the same parameters (like smtp and other env settings), but if you destroy first, a new container with new env settings will be created, or initialized.

1 me gusta

what is the difference between bootstrap and start if no container exits?

Bootstrap builds a new docker image,which is necessary to be able to “initialize” a running container.

Rebuild will always work. Sometimes it’s unnecessary, as a destroy and start is enough to make env settings (like smtp) take effect. But lots of people won’t really understand these intricacies, so it’s better to just tell them to always rebuild because it always works.

3 Me gusta

so ./discourse-setup is the least invasive command as it only recreates discourse’s software.

  1. Bootstrap from very scratch, begins with docker image
  2. start, from scratch, builds a container
  3. ./discourse-setup, runs discourse’s setup

what command is available to reapply config as

  1. defined in app.yml?
  2. referenced in app.yml?

assuming app.yml is the source of anything, so ./discourse-setup reads only this file to do its job.

If you need to know what each command does exactly you can read it here: discourse_docker/launcher at master · discourse/discourse_docker · GitHub

3 Me gusta

thanks that helps :slight_smile:
There is once mentioned setup, is it related to ./discourse-setup?

1 me gusta

Esto está un poco más completo ahora:

Uso: launcher COMANDO CONFIGURACIÓN [--skip-prereqs] [--docker-args CADENA]
Comandos:
    start:       Iniciar/inicializar un contenedor
    stop:        Detener un contenedor en ejecución
    restart:     Reiniciar un contenedor
    destroy:     Detener y eliminar un contenedor
    enter:       Abrir un shell para ejecutar comandos dentro del contenedor
    logs:        Ver los registros de Docker para un contenedor
    bootstrap:   Inicializar un contenedor para la configuración basándose en una plantilla
    run:         Ejecutar el comando dado con la configuración en el contexto de la última imagen inicializada
    rebuild:     Reconstruir un contenedor (eliminar el antiguo, inicializar, iniciar uno nuevo)
    cleanup:     Eliminar todos los contenedores que se han detenido durante > 24 horas
    start-cmd:   Generar el comando de Docker utilizado para iniciar el contenedor

Opciones:
    --skip-prereqs             No comprobar los prerrequisitos del lanzador
    --docker-args              Argumentos adicionales para pasar al ejecutar docker
    --skip-mac-address         No asignar una dirección mac
    --run-image                Anular la imagen utilizada para ejecutar el contenedor
root@monstera:/var/discourse# 
2 Me gusta

Este tema se cerró automáticamente después de 12 días. Ya no se permiten nuevas respuestas.