./launcher rebuild app Failed getting error


(dimu) #1

After running ./launcher rebuild app I am getting this error / recently tried to generate CSR for SSL

I, [2017-11-26T14:18:34.117123 #13] INFO – : Loading --stdin

/pups/lib/pups/merge_command.rb:45:in `merge’: no implicit conversion of String into Hash (TypeError)

    from /pups/lib/pups/merge_command.rb:45:in `deep_merge'
    from /pups/lib/pups/cli.rb:21:in `block in run'
    from /pups/lib/pups/cli.rb:18:in `each'
    from /pups/lib/pups/cli.rb:18:in `run'
    from /pups/bin/pups:8:in `<main>'

563614b423a210d586e453168352629e736a0bc8c148ab896bbf7ad2d0f0c820
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

any help for recover,


(dimu) #2

app.yml container

DISCOURSE_DEFAULT_LTXhkKPaQx7## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  #- "templates/web.ssl.template.yml"
  #- "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "80:80"   # http
  - "443:443" # https

params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "128MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed
env:
  LANG: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override
  UNICORN_WORKERS: 2

  ## TODO: The domain name this Discourse instance will respond to
  DISCOURSE_HOSTNAME: HIDDEN

  ## Uncomment if you want the container to be started with the same
  ## hostname (-h option) as specified above (default "$hostname-$config")
  #DOCKER_USE_HOSTNAME: true

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'HIDDEN'

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: HIDDEN
 DISCOURSE_SMTP_USER_NAME: HIDDEN
  DISCOURSE_SMTP_PASSWORD: "HIDDEN"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  #LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

  ## The CDN address for this Discourse instance (configured to pull)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: //discourse-cdn.example.com

## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-canned-replies.git
          - git clone https://github.com/angusmcleod/discourse-header-search.git
          - git clone https://github.com/iunctis/discourse-formatting-toolbar.git

## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"

(Bhanu Sharma) #3

You’re not using the included letsencrypt agent to generate certificates?


(dimu) #4

I kind of messed up when require CSR,

do you reference follow code

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  #LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

(Bhanu Sharma) #5

IMO You shouldn’t have modified the internal container and have rather opted for CSR for a reverse Proxy.

that way You could manage the certificate and let discourse live peacefully inside it’s container.


(dimu) #6

No I’m not,

I bought SSL certificate from namecheap and followd guide on Generating CSR on Apache + OpenSSL/ModSSL/Nginx + Heroku / nothing elase,

After Server restart I can usually load my forum , But Running ./rebuild container app crash the site with error I mentioned


(Jay Pfaffman) #7

My guess, which could be wrong, is that you have not named the certificates with the names that the template expects.


(dimu) #8

Really helpful if you can describe, I’m bit confused right now & I will have to re stat again with backup


(Bhanu Sharma) #9

He has SSL templates disabled. IDK what is expecting what. :cold_sweat:


#10

Uhm. It won’t rebuild with this DISCOURSE_DEFAULT_LTXhkKPaQx7 inserted at the beginning.


#11

Hi again :slight_smile:
I’m sorry, but I don’t provide support via private messages, if you have any follow-up questions, you have to ask them here.

  1. As pointed out in container file:

BE VERY CAREFUL WHEN EDITING!
YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!

From my experience, app won’t rebuild if there is anything in the container definition before the templates: part.
2. How did you enable the SSL? Did you follow official guide here: Allowing SSL / HTTPS for your Discourse Docker setup ? If so, the build script should do the rest.


(Bhanu Sharma) #12

I Guess if he follows the discourse Quick install guide the he should be getting SSL … Right?


#13

It points to above link, so yeah, I believe so:


(Bhanu Sharma) #14

@MakaryGo You noticed this funny business?


#15

That’s exactly why I’m asking how was the SSL enabled :slight_smile: