Latest stable release 2.8.13 fails to bootstrap. I’m wondering if there are any new requirements that should be met.
I, [2022-11-30T18:58:39.252132 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
ArgumentError: wrong number of arguments (given 3, expected 1)
[snip]
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 2073 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
I do not think the YAML changed since last update but I passed it through yamllint and removed all warnings (trailing whitespace and missing first space in comments), leaving long line errors aside since they never mattered.
Rebuild failed again with the same error: wrong number of arguments (given 3, expected 1)
---
## 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"
- "templates/web.socketed.template.yml"
params:
db_default_text_search_config: "pg_catalog.english"
db_shared_buffers: "256MB"
db_user: discourse
db_password: "REDACTED"
db_host: ''
# db_port: 5432
db_socket: /var/run/postgresql/.s.PGSQL.5432
# Each site has it own database
db_1_name: REDACTED
## 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
version: stable
env:
## 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: 3
## TODO: The domain name this Discourse instance will respond to
## Required. Discourse will not work with a bare IP number.
DISCOURSE_HOSTNAME: 'REDACTED'
## 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: 'REDACTED'
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: REDACTED
DISCOURSE_SMTP_PORT: 587
# DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
DISCOURSE_SMTP_USER_NAME: REDACTED
DISCOURSE_SMTP_PASSWORD: "REDACTED"
## 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
## Saml plugin setting
DISCOURSE_SAML_TARGET_URL: REDACTED
DISCOURSE_SAML_CERT_FINGERPRINT: "REDACTED"
DISCOURSE_SAML_REQUEST_METHOD: post
DISCOURSE_SAML_FULL_SCREEN_LOGIN: true
DISCOURSE_SAML_CERT: "-----BEGIN CERTIFICATE-----
REDACTED
-----END CERTIFICATE-----"
DISCOURSE_SAML_NAME_IDENTIFIER_FORMAT: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
DISCOURSE_SAML_WANT_ASSERTIONS_SIGNED: false
DISCOURSE_SAML_DEFAULT_EMAILS_VALID: true
DISCOURSE_SAML_LOG_AUTH: true
DISCOURSE_SAML_SP_CERTIFICATE: "-----BEGIN CERTIFICATE-----
REDACTED
-----END CERTIFICATE-----"
DISCOURSE_SAML_SP_PRIVATE_KEY: "-----BEGIN PRIVATE KEY-----
REDACTED
-----END PRIVATE KEY-----"
# DISCOURSE_SAML_AUTHN_REQUESTS_SIGNED: defaults to false
# DISCOURSE_SAML_VALIDATE_EMAIL_FIELDS: defaults to blank. This setting accepts pipe separated group names that are supplied in memberOf attribute in SAML payload. If the group name specified in the value matches that from memberOf attribute than the email_valid is set to
true, otherwise it defaults to false. This setting overrides DISCOURSE_SAML_DEFAULT_EMAILS_VALID.
## 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-assign.git
- git clone https://github.com/discourse/discourse-bbb.git
# - git clone https://github.com/discourse/discourse-calendar.git
- git clone https://github.com/discourse/discourse-chat-integration.git
- git clone https://github.com/discourse/discourse-checklist.git
- git clone https://github.com/discourse/discourse-encrypt.git
- git clone https://github.com/discourse/discourse-footnote.git
# - git clone https://github.com/discourse/discourse-github.git
- git clone https://github.com/discourse/discourse-policy.git
- git clone https://github.com/discourse/discourse-saml.git
- git clone https://github.com/discourse/discourse-solved.git
- git clone https://github.com/discourse/discourse-spoiler-alert.git
# - git clone https://github.com/discourse/discourse-voting.git
- git clone https://github.com/discourse/discourse-whos-online.git
- git clone https://github.com/discourse/discourse-yearly-review.git
# - git clone https://github.com/angusmcleod/discourse-custom-wizard.git
# - git clone https://github.com/angusmcleod/discourse-events.git
# - git clone https://github.com/angusmcleod/discourse-locations.git
after_postgres:
- exec: sudo -u postgres createdb $db_1_name || true
- exec:
stdin: |
ALTER USER $db_user WITH PASSWORD '$db_password';
ALTER SCHEMA public OWNER TO $db_user;
cmd: sudo -u postgres psql $db_1_name
raise_on_fail: false
- exec:
stdin: |
GRANT ALL PRIVILEGES ON DATABASE $db_1_name TO $db_user;
ALTER DATABASE $db_1_name OWNER TO $db_user;
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
UPDATE pg_database SET ENCODING = pg_char_to_encoding('UTF8') WHERE
datname = '$db_1_name' AND encoding = pg_char_to_encoding('SQL_ASCII');
cmd: sudo -u postgres psql $db_1_name
raise_on_fail: false
## 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"
This is simply a variable name for the database. It’s used in multisite environments. I do not think it has anything to do with the issue, since it did not change from earlier versions.
After commenting out all plugins and extra database, bootstrap succeeds.
After uncommenting extra database, it keeps bootstrapping.
I’m adding plugins by chunks so I can isolate the broken migration.
I found a failing case… Commenting out a chunk of suspicious plugins.
After a few attempts, I figured that the discourse-policy plugin is failing.