Closed hugoruscitti closed 3 years ago
Thanks for the bug report. Can you let me know what version of dokku you're using?
Hi @badsyntax , i have the 0.22.1 version:
# dokku version
dokku version 0.22.1
Thanks! I'll verify and try get a fix out today.
Did you perhaps remove any of the logs? There's a bunch of config missing, this is what you should be seeing:
Successfully bootstrapped, to startup use ./launcher start standalone-test-discourse-2
Untagged: local_discourse/standalone-test-discourse-2:latest
-----> Generating docker config...
-----> Set discourse-test.dokku.me for test-discourse-2
! No web listeners specified for test-discourse-2
-----> Setting config vars
DOKKU_PROXY_PORT_MAP: http:80:80
! No web listeners specified for test-discourse-2
-----> Setting config vars
DOKKU_PROXY_PORT_MAP: http:80:80
! No web listeners specified for test-discourse-2
-----> Setting config vars
DISCOURSE_DB_HOST:
DISCOURSE_DB_PORT:
DISCOURSE_DB_SOCKET: /var/run/postgresql
DISCOURSE_DEFAULT_LOCALE: en
DISCOURSE_DEVELOPER_EMAILS: me@example.com,you@example.com
DISCOURSE_HOSTNAME: discourse-test.dokku.me
DISCOURSE_SMTP_ADDRESS: box.foo.com
DISCOURSE_SMTP_PASSWORD: pa$$word
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: user@example.com
DOCKER_HOST_IP: 172.17.0.1
LANG: en_US.UTF-8
RAILS_ENV: production
RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 40000
RUBY_GC_HEAP_INIT_SLOTS: 400000
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 1.5
RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
UNICORN_SIDEKIQS: 1
UNICORN_WORKERS: 3
If you didn't remove the logs then I guess it's an issue with the config parsing. Let me know and I can debug further.
Oh, now i'm confused... I try again and it works fine with domains that hash dashes:
root@localhost:~# dokku discourse:create demo.demo-test.com.ar
-----> Creating demo.demo-test.com.ar...
Hostname for your Discourse? [discourse.dokku.me]: demo.demo-test.com.ar
Email address for admin account(s)? [me@example.com,you@example.com]: hugoruscitti@gmail.com
SMTP server address? [smtp.example.com]: smtp.gmail.com
SMTP port? [587]:
SMTP user name? [user@example.com]: hugoruscitti@gmail.com
SMTP password? [pa$$word]: *******************
-----> Updated 'demo.demo-test.com.ar' discourse env
-----> Updated 'demo.demo-test.com.ar' discourse volumes
=====> Container config updated at location /home/dokku/demo.demo-test.com.ar/discourse_standalone.yml
-----> Updating the discourse image build files
From https://github.com/discourse/discourse_docker
* branch master -> FETCH_HEAD
Already up to date.
-----> Building the discourse docker image, this can take a while...
cd /pups && git pull && /pups/bin/pups --stdin
Already up to date.
I, [2020-12-16T22:31:43.737397 #1] INFO -- : Loading --stdin
I, [2020-12-16T22:31:43.745622 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2020-12-16T22:31:43.827177 #1] INFO -- : Generating locales (this might take a while)...
Generation complete.
I, [2020-12-16T22:31:43.827883 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2020-12-16T22:31:43.835171 #1] INFO -- :
I, [2020-12-16T22:31:43.836797 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2020-12-16T22:31:43.841192 #1] INFO -- :
I, [2020-12-16T22:31:43.841947 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2020-12-16T22:31:43.845329 #1] INFO -- :
I, [2020-12-16T22:31:43.845926 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2020-12-16T22:31:43.850736 #1] INFO -- :
I, [2020-12-16T22:31:43.851487 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2020-12-16T22:31:43.857515 #1] INFO -- :
[...]
I, [2020-12-16T22:37:28.696197 #1] INFO -- : File > /root/.bash_profile chmod: 644 chown:
I, [2020-12-16T22:37:28.700958 #1] INFO -- : File > /usr/local/etc/ImageMagick-7/policy.xml chmod: chown:
I, [2020-12-16T22:37:28.709321 #1] INFO -- : Replacing (?-mix:server.+{) with limit_req_zone $binary_remote_addr zone=flood:10m rate=$reqs_per_secondr/s;
limit_req_zone $binary_remote_addr zone=bot:10m rate=$reqs_per_minuter/m;
limit_req_status 429;
limit_conn_zone $binary_remote_addr zone=connperip:10m;
limit_conn_status 429;
server {
in /etc/nginx/conf.d/discourse.conf
I, [2020-12-16T22:37:28.710263 #1] INFO -- : Replacing (?-mix:location @discourse {) with location @discourse {
limit_conn connperip $conn_per_ip;
limit_req zone=flood burst=$burst_per_second nodelay;
limit_req zone=bot burst=$burst_per_minute nodelay; in /etc/nginx/conf.d/discourse.conf
I, [2020-12-16T22:37:28.711877 #1] INFO -- : > echo "Beginning of custom commands"
I, [2020-12-16T22:37:28.714005 #1] INFO -- : Beginning of custom commands
I, [2020-12-16T22:37:28.714869 #1] INFO -- : > echo "End of custom commands"
I, [2020-12-16T22:37:28.716997 #1] INFO -- : End of custom commands
I, [2020-12-16T22:37:28.718591 #1] INFO -- : Terminating async processes
I, [2020-12-16T22:37:28.720344 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 65
I, [2020-12-16T22:37:28.721846 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 182
182:signal-handler (1608158248) Received SIGTERM scheduling shutdown...
2020-12-16 22:37:28.721 UTC [65] LOG: received fast shutdown request
2020-12-16 22:37:28.726 UTC [65] LOG: aborting any active transactions
182:M 16 Dec 2020 22:37:28.730 # User requested shutdown...
182:M 16 Dec 2020 22:37:28.731 * Saving the final RDB snapshot before exiting.
182:M 16 Dec 2020 22:37:28.737 * DB saved on disk
182:M 16 Dec 2020 22:37:28.739 # Redis is now ready to exit, bye bye...
2020-12-16 22:37:28.742 UTC [65] LOG: background worker "logical replication launcher" (PID 74) exited with exit code 1
2020-12-16 22:37:29.008 UTC [69] LOG: shutting down
2020-12-16 22:37:29.032 UTC [65] LOG: database system is shut down
sha256:f2d49e26e7608d191792bcbf111c94452f3a931911ad64de2fad7f7c46e7d0a2
911316e8dd333e1b693d36b4671bd6cf8cc5d7d90749af02a79f4b62e7cf2369
Successfully bootstrapped, to startup use ./launcher start standalone-demo.demo-test.com.ar
Untagged: local_discourse/standalone-demo.demo-test.com.ar:latest
-----> Generating docker config...
-----> Set demo.demo-test.com.ar for demo.demo-test.com.ar
! No web listeners specified for demo.demo-test.com.ar
-----> Setting config vars
DOKKU_PROXY_PORT_MAP: http:80:5000 http:80:80
! No web listeners specified for demo.demo-test.com.ar
-----> Setting config vars
DOKKU_PROXY_PORT_MAP: http:80:80
! No web listeners specified for demo.demo-test.com.ar
-----> Setting config vars
DISCOURSE_DB_HOST:
DISCOURSE_DB_PORT:
DISCOURSE_DB_SOCKET: /var/run/postgresql
DISCOURSE_DEFAULT_LOCALE: en
DISCOURSE_DEVELOPER_EMAILS: hugoruscitti@gmail.com
DISCOURSE_HOSTNAME: demo.demo-test.com.ar
DISCOURSE_SMTP_ADDRESS: smtp.gmail.com
DISCOURSE_SMTP_PASSWORD: *********************
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: hugoruscitti@gmail.com
DOCKER_HOST_IP: 172.17.0.1
LANG: en_US.UTF-8
RAILS_ENV: production
RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 40000
RUBY_GC_HEAP_INIT_SLOTS: 400000
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 1.5
RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
UNICORN_SIDEKIQS: 1
UNICORN_WORKERS: 3
great than 0.22.0
=====> Setting restart-policy to always
-----> Releasing demo.demo-test.com.ar...
-----> Deploying demo.demo-test.com.ar...
-----> Checking for predeploy task
No predeploy task found, skipping
-----> Checking for release task
No release task found, skipping
-----> No Procfile found in app image
-----> DOKKU_SCALE file exists
=====> Processing deployment checks
No CHECKS file found. Simple container checks will be performed.
For more efficient zero downtime deployments, create a CHECKS file. See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
! No procfile found
2020/12/16 22:38:45 exit status 1
-----> Attempting pre-flight checks (web.1)
Waiting for 10 seconds ...
Default container check successful!
-----> Running post-deploy
-----> Configuring demo.demo-test.com.ar...(using built-in template)
-----> Creating http nginx.conf
Reloading nginx
-----> Renaming containers
Renaming container (8d05a0646761) loving_mcclintock to demo.demo-test.com.ar.web.1
-----> Checking for postdeploy task
No postdeploy task found, skipping
=====> Application deployed:
http://demo.demo-test.com.ar
-----> Data stored in /var/lib/dokku/data/storage/demo.demo-test.com.ar
=====> Discourse app 'demo.demo-test.com.ar' created
I'm very sorry if I took your time, I should have tried more times if it failed again, I assumed there was a problem, but it could have been something random, thank you very much
Mmmm... i was able to reproduce now. It only fails when i use a discourse-hostname like "an-engine" or "pilas-engine" i think... and seems to be related to the DISCOURSE_HOSTNAME variable.
This is the non-verbose output complete:
root@localhost:~# dokku discourse:create an-engine.com
-----> Creating an-engine.com...
Hostname for your Discourse? [discourse.dokku.me]: an-engine.com
Email address for admin account(s)? [me@example.com,you@example.com]: hugoruscitti@gmail.com
SMTP server address? [smtp.example.com]: smtp.gmail.com
SMTP port? [587]:
SMTP user name? [user@example.com]: hugoruscitti@gmail.com
SMTP password? [pa$$word]: *********
-----> TEST ----- Updated discourse env
-----> Updated 'an-engine.com' discourse env
-----> Updated 'an-engine.com' discourse volumes
=====> Container config updated at location /home/dokku/an-engine.com/discourse_standalone.yml
-----> Updating the discourse image build files
From https://github.com/discourse/discourse_docker
* branch master -> FETCH_HEAD
Already up to date.
-----> Building the discourse docker image, this can take a while...
[...]
619.557017007 Compressing: application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js
uglifyjs '/var/www/discourse/public/assets/_application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js' -m -c -o '/var/www/discourse/public/assets/application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js' --source-map "base='/var/www/discourse/public/assets',root='/assets',url='/assets/application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js.map'"
gzip -f -c -9 /var/www/discourse/public/assets/application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js > /var/www/discourse/public/assets/application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js.gz
brotli -f --quality=11 /var/www/discourse/public/assets/application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js --output=/var/www/discourse/public/assets/application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js.br
Done compressing application-eae35aa9f87e0f68f318612819a6d13eaf410d4e24e8c8542b02f6a8f1549f8a.js : 45.39 secs
Done compressing all JS files : 143.67 secs
Start compiling CSS: 2020-12-17 18:16:10 UTC
Compiling css for default 2020-12-17 18:16:10 UTC
precompile target: desktop Default
2020-12-17 18:16:13.009 UTC [806] discourse@discourse LOG: duration: 201.010 ms statement: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"categories"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
precompile target: mobile Default
precompile target: desktop_rtl Default
precompile target: mobile_rtl Default
precompile target: desktop_theme Default
precompile target: mobile_theme Default
precompile target: admin Default
precompile target: wizard Default
precompile target: discourse-details Default
precompile target: discourse-local-dates Default
precompile target: discourse-presence Default
precompile target: lazy-yt Default
precompile target: poll Default
precompile target: lazy-yt_mobile Default
precompile target: poll_mobile Default
precompile target: poll_desktop Default
precompile target: color_definitions Default (Base)
precompile target: color_definitions Default (Dark)
precompile target: color_definitions Default (WCAG Light)
precompile target: color_definitions Default (WCAG Dark)
precompile target: desktop
precompile target: mobile
precompile target: desktop_rtl
precompile target: mobile_rtl
precompile target: desktop_theme
precompile target: mobile_theme
precompile target: admin
precompile target: wizard
precompile target: discourse-details
precompile target: discourse-local-dates
precompile target: discourse-presence
precompile target: lazy-yt
precompile target: poll
precompile target: lazy-yt_mobile
precompile target: poll_mobile
precompile target: poll_desktop
precompile target: color_definitions (Base)
precompile target: color_definitions (Dark)
precompile target: color_definitions (WCAG Light)
precompile target: color_definitions (WCAG Dark)
Done compiling CSS: 2020-12-17 18:16:31 UTC
I, [2020-12-17T18:16:32.562199 #1] INFO -- : Downloading MaxMindDB...
Compressing Javascript and Generating Source Maps
I, [2020-12-17T18:16:32.598976 #1] INFO -- : File > /usr/local/bin/discourse chmod: +x chown:
I, [2020-12-17T18:16:32.604879 #1] INFO -- : File > /usr/local/bin/rails chmod: +x chown:
I, [2020-12-17T18:16:32.610064 #1] INFO -- : File > /usr/local/bin/rake chmod: +x chown:
I, [2020-12-17T18:16:32.617216 #1] INFO -- : File > /usr/local/bin/rbtrace chmod: +x chown:
I, [2020-12-17T18:16:32.623575 #1] INFO -- : File > /usr/local/bin/stackprof chmod: +x chown:
I, [2020-12-17T18:16:32.631341 #1] INFO -- : File > /etc/update-motd.d/10-web chmod: +x chown:
I, [2020-12-17T18:16:32.636033 #1] INFO -- : File > /etc/logrotate.d/rails chmod: chown:
I, [2020-12-17T18:16:32.639663 #1] INFO -- : File > /etc/logrotate.d/nginx chmod: chown:
I, [2020-12-17T18:16:32.646247 #1] INFO -- : File > /etc/runit/1.d/00-ensure-links chmod: +x chown:
I, [2020-12-17T18:16:32.651622 #1] INFO -- : File > /etc/runit/1.d/01-cleanup-web-pids chmod: +x chown:
I, [2020-12-17T18:16:32.657621 #1] INFO -- : File > /root/.bash_profile chmod: 644 chown:
I, [2020-12-17T18:16:32.662081 #1] INFO -- : File > /usr/local/etc/ImageMagick-7/policy.xml chmod: chown:
I, [2020-12-17T18:16:32.672480 #1] INFO -- : Replacing (?-mix:server.+{) with limit_req_zone $binary_remote_addr zone=flood:10m rate=$reqs_per_secondr/s;
limit_req_zone $binary_remote_addr zone=bot:10m rate=$reqs_per_minuter/m;
limit_req_status 429;
limit_conn_zone $binary_remote_addr zone=connperip:10m;
limit_conn_status 429;
server {
in /etc/nginx/conf.d/discourse.conf
I, [2020-12-17T18:16:32.674175 #1] INFO -- : Replacing (?-mix:location @discourse {) with location @discourse {
limit_conn connperip $conn_per_ip;
limit_req zone=flood burst=$burst_per_second nodelay;
limit_req zone=bot burst=$burst_per_minute nodelay; in /etc/nginx/conf.d/discourse.conf
I, [2020-12-17T18:16:32.675734 #1] INFO -- : > echo "Beginning of custom commands"
I, [2020-12-17T18:16:32.678109 #1] INFO -- : Beginning of custom commands
I, [2020-12-17T18:16:32.678658 #1] INFO -- : > echo "End of custom commands"
I, [2020-12-17T18:16:32.680695 #1] INFO -- : End of custom commands
I, [2020-12-17T18:16:32.683029 #1] INFO -- : Terminating async processes
I, [2020-12-17T18:16:32.684662 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 65
2020-12-17 18:16:32.685 UTC [65] LOG: received fast shutdown request
I, [2020-12-17T18:16:32.686532 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 182
182:signal-handler (1608228992) Received SIGTERM scheduling shutdown...
2020-12-17 18:16:32.689 UTC [65] LOG: aborting any active transactions
2020-12-17 18:16:32.707 UTC [65] LOG: background worker "logical replication launcher" (PID 74) exited with exit code 1
2020-12-17 18:16:32.712 UTC [69] LOG: shutting down
182:M 17 Dec 2020 18:16:32.725 # User requested shutdown...
182:M 17 Dec 2020 18:16:32.726 * Saving the final RDB snapshot before exiting.
182:M 17 Dec 2020 18:16:32.735 * DB saved on disk
182:M 17 Dec 2020 18:16:32.736 # Redis is now ready to exit, bye bye...
2020-12-17 18:16:32.754 UTC [65] LOG: database system is shut down
sha256:b271591b60fea93aef56f10b45ba753da9e588021b4a7b52c644ddde719e9414
18a1b3331d10e58646d76b5650c3f0588dd740504c06f31af4954b7485d0813f
Successfully bootstrapped, to startup use ./launcher start standalone-an-engine.com
Untagged: local_discourse/standalone-an-engine.com:latest
-----> Generating docker config...
-----> Set an-engine.com for an-engine.com
! No web listeners specified for an-engine.com
-----> Setting config vars
DOKKU_PROXY_PORT_MAP: http:80:5000 http:80:80
! No web listeners specified for an-engine.com
-----> Setting config vars
DOKKU_PROXY_PORT_MAP: http:80:80
! No web listeners specified for an-engine.com
! Invalid env pair: ngine.com
And this is the last messages of the log with dokku trace:on
:
[...]
+ local NGINX_ACCESS_LOG_FORMAT=
++ fn-nginx-access-log-path an-engine.com
++ declare 'desc=get the configured access log path'
++ declare APP=an-engine.com
+++ fn-nginx-log-root
+++ declare 'desc=get the nginx log root'
+++ local NGINX_LOG_ROOT=/var/log/nginx
+++ fn-nginx-vhosts-uses-openresty
+++ declare 'desc=returns whether openresty is in use or not'
+++ [[ -x /usr/bin/openresty ]]
+++ return 1
+++ echo /var/log/nginx
++ local NGINX_LOG_ROOT=/var/log/nginx
++ fn-plugin-property-get-default nginx an-engine.com access-log-path /var/log/nginx/an-engine.com-access.log
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=nginx APP=an-engine.com KEY=access-log-path DEFAULT=/var/log/nginx/an-engine.com-access.log
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default nginx an-engine.com access-log-path /var/log/nginx/an-engine.com-access.log
+ local NGINX_ACCESS_LOG_PATH=/var/log/nginx/an-engine.com-access.log
++ fn-nginx-error-log-path an-engine.com
++ declare 'desc=get the configured access log path'
++ declare APP=an-engine.com
+++ fn-nginx-log-root
+++ declare 'desc=get the nginx log root'
+++ local NGINX_LOG_ROOT=/var/log/nginx
+++ fn-nginx-vhosts-uses-openresty
+++ declare 'desc=returns whether openresty is in use or not'
+++ [[ -x /usr/bin/openresty ]]
+++ return 1
+++ echo /var/log/nginx
++ local NGINX_LOG_ROOT=/var/log/nginx
++ fn-plugin-property-get-default nginx an-engine.com error-log-path /var/log/nginx/an-engine.com-error.log
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=nginx APP=an-engine.com KEY=error-log-path DEFAULT=/var/log/nginx/an-engine.com-error.log
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default nginx an-engine.com error-log-path /var/log/nginx/an-engine.com-error.log
+ local NGINX_ERROR_LOG_PATH=/var/log/nginx/an-engine.com-error.log
++ fn-nginx-proxy-read-timeout an-engine.com
++ declare 'desc=get the configured proxy read timeout'
++ declare APP=an-engine.com
++ fn-plugin-property-get-default nginx an-engine.com proxy-read-timeout 60s
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=nginx APP=an-engine.com KEY=proxy-read-timeout DEFAULT=60s
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default nginx an-engine.com proxy-read-timeout 60s
+ local PROXY_READ_TIMEOUT=60s
++ fn-nginx-proxy-buffer-size an-engine.com
++ declare 'desc=get the configured proxy buffer size'
++ declare APP=an-engine.com
+++ fn-get-pagesize
+++ declare 'desc=return the underlying system'\''s memory page size'
+++ /var/lib/dokku/core-plugins/available/nginx-vhosts/pagesize
++ fn-plugin-property-get-default nginx an-engine.com proxy-buffer-size 4096
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=nginx APP=an-engine.com KEY=proxy-buffer-size DEFAULT=4096
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default nginx an-engine.com proxy-buffer-size 4096
+ local PROXY_BUFFER_SIZE=4096
++ fn-nginx-proxy-buffering an-engine.com
++ declare 'desc=get the configured proxy buffering'
++ declare APP=an-engine.com
++ fn-plugin-property-get-default nginx an-engine.com proxy-buffering on
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=nginx APP=an-engine.com KEY=proxy-buffering DEFAULT=on
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default nginx an-engine.com proxy-buffering on
+ local PROXY_BUFFERING=on
++ fn-nginx-proxy-buffers an-engine.com
++ declare 'desc=get the configured proxy buffers'
++ declare APP=an-engine.com
+++ fn-get-pagesize
+++ declare 'desc=return the underlying system'\''s memory page size'
+++ /var/lib/dokku/core-plugins/available/nginx-vhosts/pagesize
++ fn-plugin-property-get-default nginx an-engine.com proxy-buffers '8 4096'
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=nginx APP=an-engine.com KEY=proxy-buffers 'DEFAULT=8 4096'
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default nginx an-engine.com proxy-buffers '8 4096'
+ local 'PROXY_BUFFERS=8 4096'
++ fn-nginx-proxy-busy-buffers-size an-engine.com
++ declare 'desc=get the configured proxy busy buffers size'
++ declare APP=an-engine.com
+++ fn-get-pagesize
+++ declare 'desc=return the underlying system'\''s memory page size'
+++ /var/lib/dokku/core-plugins/available/nginx-vhosts/pagesize
++ fn-plugin-property-get-default nginx an-engine.com proxy-busy-buffers-size 8192
++ declare 'desc=returns the value for a given property with a specified default value'
++ declare PLUGIN=nginx APP=an-engine.com KEY=proxy-busy-buffers-size DEFAULT=8192
++ /var/lib/dokku/core-plugins/available/common/prop get-with-default nginx an-engine.com proxy-busy-buffers-size 8192
+ local PROXY_BUSY_BUFFERS_SIZE=8192
+ [[ -z '' ]]
+ dokku_log_warn_quiet 'No web listeners specified for an-engine.com'
+ declare 'desc=log warning formatter'
+ [[ -z '' ]]
+ echo ' ! No web listeners specified for an-engine.com'
! No web listeners specified for an-engine.com
+ [[ -n an-engine.com ]]
+ [[ true == \t\r\u\e ]]
+ echo '# THIS FILE IS GENERATED BY DOKKU - DO NOT EDIT, YOUR CHANGES WILL BE OVERWRITTEN'
+ xargs -i echo 'http://{}'
++ sort -u
++ tr ' ' '\n'
++ echo '' an-engine.com
+ implemented=1
+ [[ 1 -eq 0 ]]
+ [[ 1 -eq 0 ]]
+ config_set --no-restart an-engine.com LANG=en_US.UTF-8 RAILS_ENV=production UNICORN_WORKERS=3 UNICORN_SIDEKIQS=1 RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 RUBY_GC_HEAP_INIT_SLOTS=400000 RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 DISCOURSE_DB_SOCKET=/var/run/postgresql DISCOURSE_DB_HOST= DISCOURSE_DB_PORT= DISCOURSE_DEFAULT_LOCALE=en DISCOURSE_DEVELOPER_EMAILS=hugoruscitti@gmail.com DISCOURSE_HOSTNAME=an ngine.com DISCOURSE_SMTP_ADDRESS=smtp.gmail.com 'DISCOURSE_SMTP_PASSWORD=*********' DISCOURSE_SMTP_PORT=587 DISCOURSE_SMTP_USER_NAME=hugoruscitti@gmail.com DOCKER_HOST_IP=172.17.0.1
+ declare 'desc=set value of given config var'
+ config_sub set --no-restart an-engine.com LANG=en_US.UTF-8 RAILS_ENV=production UNICORN_WORKERS=3 UNICORN_SIDEKIQS=1 RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 RUBY_GC_HEAP_INIT_SLOTS=400000 RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 DISCOURSE_DB_SOCKET=/var/run/postgresql DISCOURSE_DB_HOST= DISCOURSE_DB_PORT= DISCOURSE_DEFAULT_LOCALE=en DISCOURSE_DEVELOPER_EMAILS=hugoruscitti@gmail.com DISCOURSE_HOSTNAME=an ngine.com DISCOURSE_SMTP_ADDRESS=smtp.gmail.com 'DISCOURSE_SMTP_PASSWORD=*********' DISCOURSE_SMTP_PORT=587 DISCOURSE_SMTP_USER_NAME=hugoruscitti@gmail.com DOCKER_HOST_IP=172.17.0.1
+ declare 'desc=executes a config subcommand'
+ local name=set
+ shift
+ /var/lib/dokku/plugins/available/config/subcommands/set config:set --no-restart an-engine.com LANG=en_US.UTF-8 RAILS_ENV=production UNICORN_WORKERS=3 UNICORN_SIDEKIQS=1 RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 RUBY_GC_HEAP_INIT_SLOTS=400000 RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 DISCOURSE_DB_SOCKET=/var/run/postgresql DISCOURSE_DB_HOST= DISCOURSE_DB_PORT= DISCOURSE_DEFAULT_LOCALE=en DISCOURSE_DEVELOPER_EMAILS=hugoruscitti@gmail.com DISCOURSE_HOSTNAME=an ngine.com DISCOURSE_SMTP_ADDRESS=smtp.gmail.com 'DISCOURSE_SMTP_PASSWORD=*********' DISCOURSE_SMTP_PORT=587 DISCOURSE_SMTP_USER_NAME=hugoruscitti@gmail.com DOCKER_HOST_IP=172.17.0.1
! Invalid env pair: ngine.com
root@localhost:~# client_loop: send disconnect: Broken pipe
it seems that the variable DISCOURSE_HOSTNAME changed to an ngine.com
instead of an-ngine.com
at some point, but
i was not able to debug it.
Thanks for this info. I've now replicated the bug (see https://github.com/badsyntax/dokku-discourse/actions/runs/428896199):
# -----> Generating docker config...
# -----> Set an-engine.com for discourse-app
# ! No web listeners specified for discourse-app
# -----> Setting config vars
# DOKKU_PROXY_PORT_MAP: http:80:5000 http:80:80
# ! No web listeners specified for discourse-app
# -----> Setting config vars
# DOKKU_PROXY_PORT_MAP: http:80:80
# ! No web listeners specified for discourse-app
# ! Invalid env pair: ngine.com
I'll try get a fix out soon
As I suspected the issue appears to be in the shitty config parsing code.
These are the run args generated by the discourse docker builder script:
# RUN_ARGS: + true run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=3 -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 DISCOURSE_DEFAULT_LOCALE=en -e DISCOURSE_DEVELOPER_EMAILS=me@example.com,you@example.com -e DISCOURSE_HOSTNAME=an-engine.com -e DISCOURSE_SMTP_ADDRESS=box.example.com -e DISCOURSE_SMTP_PASSWORD=password -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=user@example.com -h fv-az213-978-standalone-discourse-app -e DOCKER_HOST_IP=172.17.0.1 --name standalone-discourse-app -t -v /var/lib/dokku/data/storage/discourse-app:/shared -v /var/lib/dokku/data/storage/discourse-app/log/var-log:/var/log --mac-address 02:17:36:d8:e4:85 local_discourse/standalone-discourse-app /sbin/boot
These are the env vars I extract from the run args:
# ENV_VARS: LANG=en_US.UTF-8 RAILS_ENV=production UNICORN_WORKERS=3 UNICORN_SIDEKIQS=1 RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 RUBY_GC_HEAP_INIT_SLOTS=400000 RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 DISCOURSE_DB_SOCKET=/var/run/postgresql DISCOURSE_DB_HOST= DISCOURSE_DB_PORT= DISCOURSE_DEFAULT_LOCALE=en DISCOURSE_DEVELOPER_EMAILS=me@example.com,you@example.com DISCOURSE_HOSTNAME=an ngine.com DISCOURSE_SMTP_ADDRESS=box.example.com DISCOURSE_SMTP_PASSWORD=password DISCOURSE_SMTP_PORT=587 DISCOURSE_SMTP_USER_NAME=user@example.com DOCKER_HOST_IP=172.17.0.1
As we can see DISCOURSE_HOSTNAME=an-engine.com
is correct in the run args but DISCOURSE_HOSTNAME=an ngine.com
is not correct in the env vars.
This is due to this shitty code:
Please excuse the expletives but I'm rather annoyed I didn't improve this shitty code when I knew it was shitty when I wrote it.
Just waiting for the tests to pass on #14 and then i'll release the fix.
If you're curious, the bit of code that was failing was:
sed -r "s/\s*\-e\s*|\s+/ /g"
Note \s*
should have been \s+
. It was matching the -e
within an-engine
.
thank you very much @badsyntax !!!, it works perfect now !!
That's great, thanks for letting me know 👍
Hi!, i get an error when i try to create a new forum application, i think it's related to the domain because it has a dash character. is it a desired constraint?
This is the most relevant output:
Thanks!