I comandi del launcher nella cartella /var/discourse non sono autoesplicativi

Ho dovuto modificare e ricaricare la configurazione più volte per risolvere i problemi relativi al servizio di posta di Siteground. Ci sono diversi consigli su come farlo nel modo più rapido.
Riassumerli tutti crea confusione.
Quindi, potresti spiegarmi in modo più dettagliato le differenze tra i comandi elencati qui sotto?

Le informazioni presenti nella guida all’installazione e nei post di questo forum sono in qualche modo incoerenti. Non è del tutto chiaro, ad esempio, qual è la differenza tra l’inizializzazione e la costruzione di un contenitore.
Dovrebbe esserci una scala di escalation che indichi quali azioni richiedono quale comando, ad esempio se si modifica app.yml: alcuni dicono che start è sufficiente, altri affermano che è necessario rebuild o anche eseguire ./discourse-setup.

Comandi:
    start:      Avvia/inizializza un contenitore
    stop:       Ferma un contenitore in esecuzione
    restart:    Riavvia un contenitore
    destroy:    Ferma e rimuove un contenitore
    bootstrap:  Avvia (bootstrap) un contenitore per la configurazione basata su un modello
    rebuild:    Ricompila un contenitore (distrugge il vecchio, esegue bootstrap, avvia il nuovo)

Sto lentamente arrivando alla convinzione che tutti i comandi rappresentino una sequenza di azioni successive.
Ogni passaggio o comando successivo fa quanto il suo predecessore più qualcosa in più.

Ad esempio, qualcosa del genere:

  1. Avvio

    1. bootstrap: distrugge il vecchio + avvia (bootstrap) un contenitore per la configurazione basata su un modello
    2. rebuild: esegue bootstrap + ricompila un contenitore (avvia il nuovo), il che significa che esegue operazioni come il download delle ultime versioni del software e l’applicazione della configurazione aggiornata
    3. start: inizializza, qualsiasi cosa ciò significhi
  2. Arresto

    1. stop: Ferma un contenitore in esecuzione
    2. restart: Riavvia un contenitore (incluso lo stop)
    3. destroy: Ferma e rimuove un contenitore
2 Mi Piace

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

1 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

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

1 Mi Piace

This is a bit more complete now:

Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Comandi:
    start:       Avvia/inizializza un container
    stop:        Arresta un container in esecuzione
    restart:     Riavvia un container
    destroy:     Arresta e rimuove un container
    enter:       Apri una shell per eseguire comandi all'interno del container
    logs:        Visualizza i log di Docker per un container
    bootstrap:   Avvia un container per la configurazione basata su un template
    run:         Esegui il comando dato con la configurazione nel contesto dell'ultima immagine avviata
    rebuild:     Ricostruisci un container (distruggi il vecchio, avvia il nuovo)
    cleanup:     Rimuovi tutti i container che sono stati arrestati per più di 24 ore
    start-cmd:   Genera il comando docker utilizzato per avviare il container

Opzioni:
    --skip-prereqs             Non controllare i prerequisiti del launcher
    --docker-args              Argomenti aggiuntivi da passare durante l'esecuzione di docker
    --skip-mac-address         Non assegnare un indirizzo mac
    --run-image                Ignora l'immagine utilizzata per eseguire il container
root@monstera:/var/discourse# 
2 Mi Piace

Questo argomento è stato chiuso automaticamente dopo 12 giorni. Non sono più consentite nuove risposte.