dokku / dokku-redirect Goto Github PK
View Code? Open in Web Editor NEWA plugin for dokku that gives the ability to set simple redirects for an application
License: MIT License
A plugin for dokku that gives the ability to set simple redirects for an application
License: MIT License
I've just upgraded from the latest 0.4.x to 0.5.4 and rebuilt all apps. Only the http
redirection in created, not the https
one. (the is_ssl_enabled is not even evaluated true, even if server.crt and server.key exist).
Apps using redirect plugin cannot be built with dokku 0.30.0
-----> Creating https nginx.conf
Enabling HSTS
/var/lib/dokku/plugins/enabled/redirect/nginx-pre-reload: line 7: /var/lib/dokku/plugins/available/proxy/functions: No such file or directory
! exit status 1
Rebuild should complete without errors
Ubuntu 18.04
dokku report APP_NAME
outputHere is the output for version 0.29.4. Can't provide information or trace for 0.30.0 at this time. This broke production apps and needed to revert as soon as I noticed the issue.
-----> uname: Linux main-server 4.15.0-204-generic #215-Ubuntu SMP Fri Jan 20 18:24:59 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
total used free shared buff/cache available
Mem: 7975 3030 883 163 4062 4487
Swap: 0 0 0
-----> docker version:
Client: Docker Engine - Community
Version: 23.0.1
API version: 1.42
Go version: go1.19.5
Git commit: a5ee5b1
Built: Thu Feb 9 19:46:49 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 23.0.1
API version: 1.42 (minimum version 1.12)
Go version: go1.19.5
Git commit: bc3805a
Built: Thu Feb 9 19:46:49 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.18
GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
-----> docker daemon info:
Client:
Context: default
Debug Mode: true
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.16.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
scan: Docker Scan (Docker Inc.)
Version: v0.23.0
Path: /usr/libexec/docker/cli-plugins/docker-scan
Server:
Containers: 41
Running: 29
Paused: 0
Stopped: 12
Images: 110
Server Version: 23.0.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
Kernel Version: 4.15.0-204-generic
Operating System: Ubuntu 18.04.6 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.789GiB
Name: main-server
ID: 5FML:WK5L:FHTC:TTMD:BGK7:2Z6O:MGNO:E7NI:QLBL:CL2U:V5KA:4GZY
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
-----> git version: git version 2.17.1
-----> sigil version: 0.9.0build+bc921b7
-----> herokuish version:
herokuish: v0.5.40
buildpacks:
heroku-buildpack-multi v1.2.0
heroku-buildpack-ruby v244
heroku-buildpack-nodejs v202
heroku-buildpack-clojure v90
heroku-buildpack-python v223
heroku-buildpack-java v72
heroku-buildpack-gradle v38
heroku-buildpack-scala v96
heroku-buildpack-play v26
heroku-buildpack-php v227
heroku-buildpack-go v169
heroku-buildpack-nginx v22
buildpack-null v3
-----> dokku version: dokku version 0.29.4
-----> plugn version: plugn: 0.12.0build+3a27594
-----> dokku plugins:
00_dokku-standard 0.29.4 enabled dokku core standard plugin
20_events 0.29.4 enabled dokku core events logging plugin
app-json 0.29.4 enabled dokku core app-json plugin
apps 0.29.4 enabled dokku core apps plugin
apt 0.12.0 enabled Inject deb packages into dokku based on files in project
builder 0.29.4 enabled dokku core builder plugin
builder-dockerfile 0.29.4 enabled dokku core builder-dockerfile plugin
builder-herokuish 0.29.4 enabled dokku core builder-herokuish plugin
builder-lambda 0.29.4 enabled dokku core builder-lambda plugin
builder-null 0.29.4 enabled dokku core builder-null plugin
builder-pack 0.29.4 enabled dokku core builder-pack plugin
buildpacks 0.29.4 enabled dokku core buildpacks plugin
caddy-vhosts 0.29.4 enabled dokku core caddy-vhosts plugin
certs 0.29.4 enabled dokku core certificate management plugin
checks 0.29.4 enabled dokku core checks plugin
common 0.29.4 enabled dokku core common plugin
config 0.29.4 enabled dokku core config plugin
cron 0.29.4 enabled dokku core cron plugin
docker-options 0.29.4 enabled dokku core docker-options plugin
domains 0.29.4 enabled dokku core domains plugin
enter 0.29.4 enabled dokku core enter plugin
git 0.29.4 enabled dokku core git plugin
http-auth 0.6.2 enabled HTTP authentication for apps
letsencrypt 0.12.1 enabled Automated installation of let's encrypt TLS certificates
logs 0.29.4 enabled dokku core logs plugin
maintenance 0.5.1 enabled Maintenance mode for apps
network 0.29.4 enabled dokku core network plugin
nginx-vhosts 0.29.4 enabled dokku core nginx-vhosts plugin
plugin 0.29.4 enabled dokku core plugin plugin
postgres 1.17.0 enabled dokku postgres service plugin
proxy 0.29.4 enabled dokku core proxy plugin
ps 0.29.4 enabled dokku core ps plugin
redirect 0.7.1 enabled Plugin for managing application redirects
redis 1.19.0 enabled dokku redis service plugin
registry 0.29.4 enabled dokku core registry plugin
repo 0.29.4 enabled dokku core repo plugin
resource 0.29.4 enabled dokku core resource plugin
run 0.29.4 enabled dokku core run plugin
scheduler 0.29.4 enabled dokku core scheduler plugin
scheduler-docker-local 0.29.4 enabled dokku core scheduler-docker-local plugin
scheduler-null 0.29.4 enabled dokku core scheduler-null plugin
shell 0.29.4 enabled dokku core shell plugin
ssh-keys 0.29.4 enabled dokku core ssh-keys plugin
storage 0.29.4 enabled dokku core storage plugin
trace 0.29.4 enabled dokku core trace plugin
traefik-vhosts 0.29.4 enabled dokku core traefik-vhosts plugin
=====> app_name app-json information
App json computed selected: app.json
App json global selected: app.json
App json selected:
=====> app_name app information
App created at: 1669226315
App deploy source: app_name
App deploy source metadata: app_name
App dir: /home/dokku/app_name
App locked: false
=====> app_name builder information
Builder build dir:
Builder computed build dir:
Builder computed selected:
Builder global build dir:
Builder global selected:
Builder selected:
=====> app_name builder-dockerfile information
Builder dockerfile computed dockerfile path: Dockerfile
Builder dockerfile global dockerfile path: Dockerfile
Builder dockerfile dockerfile path:
=====> app_name builder-lambda information
Builder lambda computed lambdayml path: lambda.yml
Builder lambda global lambdayml path: lambda.yml
Builder lambda lambdayml path:
=====> app_name builder-pack information
Builder pack computed projecttoml path: project.toml
Builder pack global projecttoml path: project.toml
Builder pack projecttoml path:
=====> app_name buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest-20
Buildpacks global stack:
Buildpacks list: https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git,https://github.com/heroku/heroku-buildpack-ruby.git
Buildpacks stack:
=====> app_name ssl information
Ssl dir: /home/dokku/app_name/tls
Ssl enabled: true
Ssl hostnames: app_domain.es app_domain.fr app_domain.gr app_domain.it app_domain2.com app_domain2.gr app_domain2.it app_name.hostname.com www.app_domain.es www.app_domain.fr www.app_domain.gr www.app_domain.it www.app_domain2.com www.app_domain2.gr www.app_domain2.it
Ssl expires at: Mar 20 23:01:34 2023 GMT
Ssl issuer: C = US, O = Let's Encrypt, CN = R3
Ssl starts at: Dec 20 23:01:35 2022 GMT
Ssl subject: subject=CN = app_name.hostname.com
Ssl verified: self signed
=====> app_name checks information
Checks disabled list: none
Checks skipped list: none
Checks computed wait to retire: 60
Checks global wait to retire: 60
Checks wait to retire:
=====> app_name cron information
Cron task count: 2
=====> app_name docker options information
Docker options build: --link dokku.postgres.app_name_db:dokku-postgres-app_name-db --link dokku.redis.app_name_redis:dokku-redis-app_name-redis
Docker options deploy: --link dokku.postgres.app_name_db:dokku-postgres-app_name-db --link dokku.redis.app_name_redis:dokku-redis-app_name-redis --restart=on-failure:10
Docker options run: --link dokku.postgres.app_name_db:dokku-postgres-app_name-db --link dokku.redis.app_name_redis:dokku-redis-app_name-redis
=====> app_name domains information
Domains app enabled: true
Domains app vhosts: app_name.hostname.com app_domain2.it app_domain.gr app_domain2.gr app_domain2.com www.app_domain2.it www.app_domain.gr www.app_domain2.gr www.app_domain2.com app_domain.it www.app_domain.it app_domain.es www.app_domain.es app_domain.fr www.app_domain.fr
Domains global enabled: false
Domains global vhosts:
=====> app_name git information
Git deploy branch: master
Git global deploy branch: master
Git keep git dir: false
Git rev env var: GIT_REV
Git sha: 768cfe9
Git source image:
Git last updated at: 1675885507
=====> app_name http-auth information
Http auth enabled: false
=====> app_name logs information
Logs computed max size: 10m
Logs global max size: 10m
Logs global vector sink:
Logs max size:
Logs vector sink:
=====> app_name network information
Network attach post create:
Network attach post deploy:
Network bind all interfaces: false
Network computed attach post create:
Network computed attach post deploy:
Network computed bind all interfaces: false
Network computed initial network:
Network computed tld:
Network global attach post create:
Network global attach post deploy:
Network global bind all interfaces: false
Network global initial network:
Network global tld:
Network initial network:
Network static web listener:
Network tld:
Network web listeners: 172.17.0.31:5000
=====> app_name nginx information
Nginx access log format:
Nginx access log path: /var/log/nginx/app_name-access.log
Nginx bind address ipv4:
Nginx bind address ipv6: ::
Nginx client max body size:
Nginx disable custom config: false
Nginx error log path: /var/log/nginx/app_name-error.log
Nginx global hsts: true
Nginx computed hsts: true
Nginx hsts:
Nginx hsts include subdomains: true
Nginx hsts max age: 15724800
Nginx hsts preload: false
Nginx computed nginx conf sigil path: nginx.conf.sigil
Nginx global nginx conf sigil path: nginx.conf.sigil
Nginx nginx conf sigil path:
Nginx proxy buffer size: 4096
Nginx proxy buffering: on
Nginx proxy buffers: 8 4096
Nginx proxy busy buffers size: 8192
Nginx proxy read timeout: 60s
Nginx last visited at: 1676892016
Nginx x forwarded for value: $remote_addr
Nginx x forwarded port value: $server_port
Nginx x forwarded proto value: $scheme
Nginx x forwarded ssl:
=====> app_name proxy information
Proxy enabled: true
Proxy port map: http:80:5000 https:443:5000
Proxy type: nginx
=====> app_name ps information
Deployed: true
Processes: 2
Ps can scale: true
Ps computed procfile path: Procfile
Ps global procfile path: Procfile
Ps procfile path:
Ps restart policy: on-failure:10
Restore: true
Running: true
Status web 1: running (CID: 6bdf2a325b3)
Status worker 1: running (CID: 5f84dde6537)
=====> app_name registry information
Registry computed image repo: dokku/app_name
Registry computed push on release: false
Registry computed server:
Registry global push on release:
Registry global server:
Registry image repo:
Registry push on release:
Registry server:
Registry tag version:
=====> app_name resource information
=====> app_name scheduler information
Scheduler computed selected: docker-local
Scheduler global selected: docker-local
Scheduler selected:
=====> app_name scheduler-docker-local information
Scheduler docker local disable chown:
Scheduler docker local init process: true
Scheduler docker local parallel schedule count:
=====> app_name storage information
Storage build mounts:
Storage deploy mounts:
Storage run mounts:
VPS on digital ocean via relevant marketplace item
If you're using Dokku - especially for commercial purposes - consider donating to project development via OpenCollective or Patreon. Funds go to general development, support, and infrastructure costs.
If you'd like to sponsor specific functionality, see the project's Sponsoring document.
If you need support for a version of Dokku that is more than a year old, your issue may be closed without an answer. Please upgrade to a recent version before filing an issue.
After I upgraded to Dokku 0.31.0 this plugin stopped working for me, I get the following error:
root@ubuntu-2gb-ash-1:~# dokku redirect:set app dataconnectorpro.com dataconnector-pro.com
-----> Setting redirect for app...
-----> Ensuring network configuration is in sync for app
-----> Configuring dataconnector.pro...(using built-in template)
-----> Configuring dataconnector-pro.com...(using built-in template)
-----> Configuring dataconnectorpro.com...(using built-in template)
-----> Creating https nginx.conf
Enabling HSTS
-----> Configuring redirect for dataconnectorpro.com to dataconnector-pro.com via HTTP 301...
template: nginx.conf.sigil:4:19: executing "nginx.conf.sigil" at <index $port_map_list 1>: error calling index: reflect: slice index out of range
Install Dokku 0.31.0, create an app, attempt to setup a redirect.
An error occurs.
No error occurs.
I don't believe this is relevant for this issue.
I successfully used this plugin on Dokku 0.4.14.
Now, I've updated straight to Dokku 0.5.3, which works fine.
However, when I try to set a new redirect, I have this error:
~ dokku redirect:set myapp app.com www.app.com
-----> Setting redirect for myapp...
-----> Configuring myapp...(using built-in template)
-----> Configuring www.app.com...(using built-in template)
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
-----> Configuring redirect for app.com to www.app.com...
Reloading nginx
nginx: [emerg] invalid port in "[::]:" of the "listen" directive in /home/dokku/myapp/nginx.conf:40
nginx: configuration file /etc/nginx/nginx.conf test failed
www.myapp.com
is a domain already assigned to myapp; myapp.com
isn't.
Here's the bit of content which has been added at the end of /home/dokku/myapp/nginx.conf
after running the above (failed) command:
server {
listen [::]:;
listen ;
server_name app.com;
return 301 $scheme://www.app.com$request_uri;
}
=> It seems the port is not set?
Hello,
I have some apps that are accessible through a VPN, so they only listen on the private VPN address. The nginx configuration of this plugin hardcodes the listening directives and so unless I’m missing something it’s not possible to change it.
Would there be a way to setup a redirect on a specific bind address (like dokku nginx:set $APP_NAME bind-address-ipv4
)?
Thanks in advance.
I tried to insert a redirection with dokku-redirect and I wrongfully added the protocol with it. It did overwrite my Nginx configuration in Dokku and now I can't rollback or push my new changes to the app because the Nginx output the file as being with errors in it; here's part of the file it outputs and the rejection:
server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
server_name https;
access_log off;
ssl_certificate /home/dokku/askalfred-to/tls/server.crt;
ssl_certificate_key /home/dokku/askalfred-to/tls/server.key;
return https $scheme:////www.mydomain.to$request_uri;
}
[...]
To ***
! [remote rejected] master -> master (pre-receive hook declined)
What to do in this kind of situation ? How can I restore the previous Nginx configuration ?
is it possible?
Maybe make possible configure something like:
www.domain.com/* → domain.com/$1
My redirection setup:
$ dokku redirect nikem
SOURCE DESTINATION CODE
www.nikem.de nikem.de 301
I try to renew the certificate for my application with letsencrypt. The renew fails for the redirected URL:
$ dokku letsencrypt:auto-renew nikem
...
2021/04/19 12:36:53 [INFO] [nikem.cloud-1.nikem.eu, www.nikem.de, nikem.de] acme: Obtaining bundled SAN certificate
2021/04/19 12:36:54 [INFO] [nikem.cloud-1.nikem.eu] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/124...0
2021/04/19 12:36:54 [INFO] [nikem.de] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/124...1
2021/04/19 12:36:54 [INFO] [www.nikem.de] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/124...2
2021/04/19 12:37:07 [INFO] [www.nikem.de] acme: Trying to solve HTTP-01
2021/04/19 12:37:08 [WARN] Received request for domain nikem.de:443 with method GET but the domain did not match any challenge. Please ensure your are passing the Host header properly.
2021/04/19 12:37:09 [WARN] Received request for domain nikem.de:443 with method GET but the domain did not match any challenge. Please ensure your are passing the Host header properly.
2021/04/19 12:37:09 [WARN] Received request for domain nikem.de:443 with method GET but the domain did not match any challenge. Please ensure your are passing the Host header properly.
2021/04/19 12:37:12 [WARN] Received request for domain nikem.de:443 with method GET but the domain did not match any challenge. Please ensure your are passing the Host header properly.
2021/04/19 12:37:14 [INFO] Skipping deactivating of valid auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/124...0
2021/04/19 12:37:14 [INFO] Skipping deactivating of valid auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/124...1
2021/04/19 12:37:14 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/124...2
2021/04/19 12:37:14 [INFO] Unable to deactivate the authorization: https://acme-v02.api.letsencrypt.org/acme/authz-v3/124...2
2021/04/19 12:37:14 Could not obtain certificates:
error: one or more domains had a problem:
[www.nikem.de] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: The key authorization file from the server did not match this challenge "16x_..." != "TEST"
-----> Certificate retrieval failed!
It's reproducible. Add an additional domain to your application, set up letsencrypt and add the redirect from the additional domain to the "main" domain.
$ dokku domains:add nikem www.nikem.de
$ dokku letsencrypt:enable nikem
$ dokku redirect:set nikem www.nikem.de nikem.de
$ dokku letsencrypt:auto-renew nikem
2021/04/19 12:37:14 Could not obtain certificates:
error: one or more domains had a problem:
[www.nikem.de] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: The key authorization file from the server did not match this challenge "16x_..." != "TEST"
-----> Certificate retrieval failed!
Certificate renewal succeeds.
If you remove the redirect again dokku redirect:unset nikem www.nikem.de
, it works:
2021/04/19 13:31:58 [INFO] [www.nikem.de] acme: Trying to solve HTTP-01
2021/04/19 13:31:59 [INFO] [www.nikem.de] Served key authentication
2021/04/19 13:31:59 [INFO] [www.nikem.de] Served key authentication
2021/04/19 13:31:59 [INFO] [www.nikem.de] Served key authentication
2021/04/19 13:31:59 [INFO] [www.nikem.de] Served key authentication
2021/04/19 13:32:03 [INFO] [www.nikem.de] The server validated our request
2021/04/19 13:32:03 [INFO] [nikem.cloud-1.nikem.eu, www.nikem.de, nikem.de] acme: Validations succeeded; requesting certificates
2021/04/19 13:32:04 [INFO] [nikem.cloud-1.nikem.eu] Server responded with a certificate.
-----> Certificate retrieved successfully.
-----> Installing let's encrypt certificates
dokku report nikem
output-----> uname: Linux ubuntu-2gb-nbg1-2 4.15.0-141-generic #145-Ubuntu SMP Wed Mar 24 18:08:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
total used free shared buff/cache available
Mem: 1945 773 230 1 940 1012
Swap: 0 0 0
-----> docker version:
Client: Docker Engine - Community
Version: 20.10.6
API version:1.41
Go version: go1.13.15
Git commit: 370c289
Built: Fri Apr 9 22:46:01 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version:go1.13.15
Git commit:8728dd2
Built: Fri Apr 9 22:44:13 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
-----> docker daemon info:
WARNING: No swap limit support
Client:
Context: default
Debug Mode: true
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
Server:
Containers: 3
Running: 3
Paused: 0
Stopped: 0
Images: 23
Server Version: 20.10.6
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc version: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-141-generic
Operating System: Ubuntu 18.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.899GiB
Name: ubuntu-2gb-nbg1-2
ID: QDU6:ZJZA:SBMS:Z2AR:O6DA:5DQT:SBQT:TUKC:O2K4:EIJJ:KSWV:JDTL
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
-----> git version: git version 2.17.1
-----> sigil version: 0.6.0
-----> herokuish version:
herokuish: 0.5.27
buildpacks:
heroku-buildpack-multi v1.0.0
heroku-buildpack-ruby v225
heroku-buildpack-nodejs v183
heroku-buildpack-clojure v87
heroku-buildpack-python v191
heroku-buildpack-java v69
heroku-buildpack-gradle v35
heroku-buildpack-scala v90
heroku-buildpack-play v26
heroku-buildpack-phpv190
heroku-buildpack-go v153
buildpack-nginx v14
buildpack-null v3
-----> dokku version: dokku version 0.24.4
-----> plugn version: plugn: 0.6.1
-----> dokku plugins:
00_dokku-standard 0.24.4 enabled dokku core standard plugin
20_events 0.24.4 enabled dokku core events logging plugin
app-json 0.24.4 enabled dokku core app-json plugin
apps 0.24.4 enabled dokku core apps plugin
builder0.24.4 enabled dokku core builder plugin
builder-dockerfile 0.24.4 enabled dokku core builder-dockerfile plugin
builder-herokuish 0.24.4 enabled dokku core builder-herokuish plugin
builder-pack 0.24.4 enabled dokku core builder-pack plugin
buildpacks 0.24.4 enabled dokku core buildpacks plugin
certs 0.24.4 enabled dokku core certificate management plugin
checks 0.24.4 enabled dokku core checks plugin
common 0.24.4 enabled dokku core common plugin
config 0.24.4 enabled dokku core config plugin
cron 0.24.4 enabled dokku core cron plugin
docker-options0.24.4 enabled dokku core docker-options plugin
domains0.24.4 enabled dokku core domains plugin
enter 0.24.4 enabled dokku core enter plugin
git 0.24.4 enabled dokku core git plugin
letsencrypt 0.11.9 enabled Automated installation of let's encrypt TLS certificates
logs 0.24.4 enabled dokku core logs plugin
network0.24.4 enabled dokku core network plugin
nginx-vhosts 0.24.4 enabled dokku core nginx-vhosts plugin
plugin 0.24.4 enabled dokku core plugin plugin
proxy 0.24.4 enabled dokku core proxy plugin
ps 0.24.4 enabled dokku core ps plugin
redirect 0.6.2 enabled Plugin for managing application redirects
repo 0.24.4 enabled dokku core repo plugin
resource 0.24.4 enabled dokku core resource plugin
scheduler-docker-local 0.24.4 enabled dokku core scheduler-docker-local plugin
shell 0.24.4 enabled dokku core shell plugin
ssh-keys 0.24.4 enabled dokku core ssh-keys plugin
storage0.24.4 enabled dokku core storage plugin
tags 0.24.4 enabled dokku core tags plugin
tar 0.24.4 enabled dokku core tar plugin
trace 0.24.4 enabled dokku core trace plugin
=====> nikem app information
App deploy source:
App dir: /home/dokku/nikem
App locked: false
=====> nikem builder information
Builder computed selected:
Builder global selected:
Builder selected:
=====> nikem buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest
Buildpacks global stack:
Buildpacks list:
Buildpacks stack:
=====> nikem ssl information
Ssl dir: /home/dokku/nikem/tls
Ssl enabled: true
Ssl hostnames: nikem.cloud-1.nikem.eu nikem.de www.nikem.de
Ssl expires at: Jul 18 12:32:04 2021 GMT
Ssl issuer: C = US, O = Let's Encrypt, CN = R3
Ssl starts at: Apr 19 12:32:04 2021 GMT
Ssl subject: subject=CN = nikem.cloud-1.nikem.eu
Ssl verified: verified by a certificate authority
=====> nikem checks information
Checks disabled list: none
Checks skipped list: none
=====> nikem cron information
Cron task count: 0
=====> nikem docker options information
Docker options build:
Docker options deploy: --restart=on-failure:10
Docker options run:
=====> nikem domains information
Domains app enabled: true
Domains app vhosts: nikem.cloud-1.nikem.eu www.nikem.de nikem.de
Domains global enabled: true
Domains global vhosts: cloud-1.nikem.eu
=====> nikem git information
Git deploy branch: master
Git global deploy branch: master
Git keep git dir:false
Git rev env var: GIT_REV
Git sha: f6790d7
Git last updated at: 1606422734
=====> nikem logs information
Logs computed max size: 10m
Logs global max size: 10m
Logs global vector sink:
Logs max size:
Logs vector sink:
=====> nikem network information
Network attach post create:
Network attach post deploy:
Network bind all interfaces: false
Network web listeners: 172.17.0.4:5000
=====> nikem nginx information
Nginx access log format:
Nginx access log path: /var/log/nginx/nikem-access.log
Nginx bind address ipv4:
Nginx bind address ipv6:::
Nginx client max body size:
Nginx disable custom config: false
Nginx error log path: /var/log/nginx/nikem-error.log
Nginx global hsts: true
Nginx computed hsts: true
Nginx hsts:
Nginx hsts include subdomains: true
Nginx hsts max age: 15724800
Nginx hsts preload: false
Nginx proxy buffer size:4096
Nginx proxy buffering: on
Nginx proxy buffers: 8 4096
Nginx proxy busy buffers size: 8192
Nginx proxy read timeout: 60s
Nginx last visited at: 1618840054
Nginx x forwarded for value: $remote_addr
Nginx x forwarded port value: $server_port
Nginx x forwarded proto value: $scheme
Nginx x forwarded ssl:
=====> nikem proxy information
Proxy enabled: true
Proxy port map: http:80:5000 https:443:5000
Proxy type: nginx
=====> nikem ps information
Deployed: true
Processes:1
Ps can scale: true
Ps restart policy: on-failure:10
Restore: true
Running: true
Status web 1: running (CID: a4effa2ad3d)
=====> nikem resource information
=====> nikem scheduler-docker-local information
Scheduler docker local disable chown:
=====> nikem storage information
Storage build mounts:
Storage deploy mounts:
Storage run mounts:
Installation according to dokku docs on a virtual host.
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.6/bootstrap.sh;
sudo DOKKU_TAG=v0.24.6 bash bootstrap.sh
Nginx configuration:
server {
listen [::]:80;
listen 80;
server_name www.nikem.de;
access_log off;
return 301 $scheme://nikem.de$request_uri;
}
server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
server_name www.nikem.de;
access_log off;
ssl_certificate /home/dokku/nikem/tls/server.crt;
ssl_certificate_key /home/dokku/nikem/tls/server.key;
return 301 $scheme://nikem.de$request_uri;
}
server {
listen [::]:80;
listen 80;
server_name nikem.cloud-1.nikem.eu www.nikem.de nikem.de;
access_log /var/log/nginx/nikem-access.log;
error_log /var/log/nginx/nikem-error.log;
return 301 https://$host:443$request_uri;
}
server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
server_name nikem.cloud-1.nikem.eu www.nikem.de nikem.de;
access_log /var/log/nginx/nikem-access.log;
error_log /var/log/nginx/nikem-error.log;
ssl_certificate /home/dokku/nikem/tls/server.crt;
ssl_certificate_key/home/dokku/nikem/tls/server.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
keepalive_timeout 70;
location / {
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_vary on;
gzip_comp_level 6;
proxy_pass http://nikem-5000;
http2_push_preload on;
proxy_http_version 1.1;
proxy_read_timeout 60s;
proxy_buffer_size 4096;
proxy_buffering on;
proxy_buffers 8 4096;
proxy_busy_buffers_size 8192;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Request-Start $msec;
}
include /home/dokku/nikem/nginx.conf.d/*.conf;
error_page 400 401 402 403 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 /400-error.html;
location /400-error.html {
root /var/lib/dokku/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 404 /404-error.html;
location /404-error.html {
root /var/lib/dokku/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 500 501 503 504 505 506 507 508 509 510 511 /500-error.html;
location /500-error.html {
root /var/lib/dokku/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 502 /502-error.html;
location /502-error.html {
root /var/lib/dokku/data/nginx-vhosts/dokku-errors;
internal;
}
}
upstream nikem-5000 {
server 172.17.0.4:5000;
}
Access log of dokku letsencrypt:auto-renew nikem
:
2a05:d014:3ad:701:d969:e08f:1bb9:62bd - - [19/Apr/2021:14:37:08 +0200] "GET /.well-known/acme-challenge/16x_... HTTP/1.1" 301 178 "http://www.nikem.de/.well-known/acme-challenge/16x_..." "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
2a05:d014:3ad:701:d969:e08f:1bb9:62bd - - [19/Apr/2021:14:37:08 +0200] "GET /.well-known/acme-challenge/16x_... HTTP/1.1" 200 4 "http://nikem.de/.well-known/acme-challenge/16x_..." "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
2600:3000:2710:200::20 - - [19/Apr/2021:14:37:08 +0200] "GET /.well-known/acme-challenge/16x_... HTTP/1.1" 301 178 "http://www.nikem.de/.well-known/acme-challenge/16x_..." "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
2600:1f14:804:fd02:1be3:bfea:ffcc:a21f - - [19/Apr/2021:14:37:08 +0200] "GET /.well-known/acme-challenge/16x_... HTTP/1.1" 301 178 "http://www.nikem.de/.well-known/acme-challenge/16x_..." "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
2600:1f16:269:da00:4ec6:1cf7:34d5:6263 - - [19/Apr/2021:14:37:08 +0200] "GET /.well-known/acme-challenge/16x_... HTTP/1.1" 301 178 "http://www.nikem.de/.well-known/acme-challenge/16x_..." "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
2600:1f16:269:da00:4ec6:1cf7:34d5:6263 - - [19/Apr/2021:14:37:09 +0200] "GET /.well-known/acme-challenge/16x_... HTTP/1.1" 200 4 "http://nikem.de/.well-known/acme-challenge/16x_..." "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
2600:1f14:804:fd02:1be3:bfea:ffcc:a21f - - [19/Apr/2021:14:37:09 +0200] "GET /.well-known/acme-challenge/16x_... HTTP/1.1" 200 4 "http://nikem.de/.well-known/acme-challenge/16x_..." "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
2600:3000:2710:200::20 - - [19/Apr/2021:14:37:12 +0200] "GET /.well-known/acme-challenge/16x_... HTTP/1.1" 200 4 "http://nikem.de/.well-known/acme-challenge/16x_..." "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
If you need more information, let me know. Thanks :-)
If you're using Dokku - especially for commercial purposes - consider donating to project development via OpenCollective or Patreon. Funds go to general development, support, and infrastructure costs.
If you'd like to sponsor specific functionality, see the project's Sponsoring document.
If you need support for a version of Dokku that is more than a year old, your issue may be closed without an answer. Please upgrade to a recent version before filing an issue.
When using Dokku 0.30.0 and this plugin a deploy of your application will result in remote: /var/lib/dokku/plugins/enabled/redirect/nginx-pre-reload: line 36: is_spdy_enabled: command not found
being show as a part of the deployment output. It all appears to work fine though so it may just be a warning but it is concerning.
Use this plugin and Dokku 0.30.0+. Deploy a project using redirects.
Error remote: /var/lib/dokku/plugins/enabled/redirect/nginx-pre-reload: line 36: is_spdy_enabled: command not found
shown in logs but it all appears to still work.
No errors.
I don't believe any further information is necessary/pertinent but if it's needed I can provide. I believe this issue can be solved by removing a single line from the nginx-pre-reload
file but I imagine this will have to wait until the SPDY deprecation completes?
Hi, can this plugin be used to create a simple redirection even when there are no deployments for the app? I couldn't get it to work. It seems like without a deployment the nginx.conf
file is not even created. Just wondering of there's an easier way to do it. Thank you.
No commits since 2018 but still in beta
When setting up a redirect I get the following error:
-----> Configuring redirect for www.example.com to via HTTP 301... template: nginx.conf.sigil:4:19: executing "nginx.conf.sigil" at <index $port_map_list...>: error calling index: index out of range: 1
Dokku version: 0.11.3
dokku-redirect version: 0.5.0
How can I fix this?
With the most recent version of dokku-redirect and dokku v5.7 that leaves me with is_spdy_enabled: command not found
That named nginx function was introduced in dokku v6.0.
I have two domains configured for my app: domain.com
and www.domain.com
, and both are TLS-enabled.
The redirection I have set is domain.com
-> www.domain.com
.
The readme states:
This plugin only redirects one domain to another and does not handle complete URLs. If both domains are managed by dokku and are TLS enabled, then nginx configuration for https redirects will be handled automatically.
So I should experience:
http://domain.com
-> https://www.domain.com
http://www.domain.com
-> https://www.domain.com
https://domain.com
-> https://www.domain.com
The first and second cases are ok, but the third redirection is not done. In other words, I can see my page at both end-URL https://domain.com
and https://www.domain.com
.
I had to source dive to determine that this plugin uses 301 redirects
I'd appreciate a choice between permanent 301 redirects and ephemeral 302/303/307 redirects.
Hi there,
I was using this plugin without any problem since updating to dokku 0.7.2 then an infinite redirect loop happened for a simple redirection like: www.domain.com to domain.com.
I tried unsetting, reinstalling, etc.
Thanks.
I'm trying to redirect mydomain.com to www.mydomain.com, and while that works, the problem is that www.mydomain.com then keeps redirecting back to itself, when it shouldn't.
Any app that I tested fails to build or start when this plugin is installed after update to dokku 0.30.0. Only tested apps with nginx proxy.
The error happens while creating nginx.conf:
-----> Creating http nginx.conf
remote: /var/lib/dokku/plugins/enabled/redirect/nginx-pre-reload: line 7: /var/lib/dokku/plugins/available/proxy/functions: No such file or directory
very reproducible. The error happens on all apps that i tested.
git push app to dokku failes with the above error message
git push app to dokku succeeds
dokku report APP_NAME
output-----> uname: Linux 2902d598552a 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
total used free shared buff/cache available
Mem: 7959 950 1955 354 5052 6353
Swap: 4095 3 4092
-----> docker version:
Client: Docker Engine - Community
Version: 23.0.1
API version: 1.41 (downgraded from 1.42)
Go version: go1.19.5
Git commit: a5ee5b1
Built: Thu Feb 9 19:46:56 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Desktop 4.15.0 (93002)
Engine:
Version: 20.10.21
API version: 1.41 (minimum version 1.12)
Go version: go1.18.7
Git commit: 3056208
Built: Tue Oct 25 18:00:19 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.10
GitCommit: 770bd0108c32f3fb5c73ae1264f7e503fe7b2661
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
-----> docker daemon info:
Client:
Context: default
Debug Mode: true
Plugins:
compose: Docker Compose (Docker Inc.)
Version: v2.16.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 14
Running: 6
Paused: 0
Stopped: 8
Images: 23
Server Version: 20.10.21
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 770bd0108c32f3fb5c73ae1264f7e503fe7b2661
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: default
cgroupns
Kernel Version: 5.15.49-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.773GiB
Name: docker-desktop
ID: EIOT:KYT7:P6FM:4LV3:EV67:VRP4:SANJ:LTRU:IINK:M3ZR:K44C:NCVY
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false
-----> git version: git version 2.25.1
-----> sigil version: 0.9.0build+bc921b7
-----> herokuish version:
herokuish: v0.5.40
buildpacks:
heroku-buildpack-multi v1.2.0
heroku-buildpack-ruby v244
heroku-buildpack-nodejs v202
heroku-buildpack-clojure v90
heroku-buildpack-python v223
heroku-buildpack-java v72
heroku-buildpack-gradle v38
heroku-buildpack-scala v96
heroku-buildpack-play v26
heroku-buildpack-php v227
heroku-buildpack-go v169
heroku-buildpack-nginx v22
buildpack-null v3
-----> dokku version: dokku version 0.30.0
-----> plugn version: plugn: 0.12.0build+3a27594
-----> dokku plugins:
00_dokku-standard 0.30.0 enabled dokku core standard plugin
20_events 0.30.0 enabled dokku core events logging plugin
app-json 0.30.0 enabled dokku core app-json plugin
apps 0.30.0 enabled dokku core apps plugin
builder 0.30.0 enabled dokku core builder plugin
builder-dockerfile 0.30.0 enabled dokku core builder-dockerfile plugin
builder-herokuish 0.30.0 enabled dokku core builder-herokuish plugin
builder-lambda 0.30.0 enabled dokku core builder-lambda plugin
builder-null 0.30.0 enabled dokku core builder-null plugin
builder-pack 0.30.0 enabled dokku core builder-pack plugin
buildpacks 0.30.0 enabled dokku core buildpacks plugin
caddy-vhosts 0.30.0 enabled dokku core caddy-vhosts plugin
certs 0.30.0 enabled dokku core certificate management plugin
checks 0.30.0 enabled dokku core checks plugin
common 0.30.0 enabled dokku core common plugin
config 0.30.0 enabled dokku core config plugin
cron 0.30.0 enabled dokku core cron plugin
docker-options 0.30.0 enabled dokku core docker-options plugin
domains 0.30.0 enabled dokku core domains plugin
enter 0.30.0 enabled dokku core enter plugin
git 0.30.0 enabled dokku core git plugin
haproxy-vhosts 0.30.0 enabled dokku core haproxy-vhosts plugin
logs 0.30.0 enabled dokku core logs plugin
network 0.30.0 enabled dokku core network plugin
nginx-vhosts 0.30.0 enabled dokku core nginx-vhosts plugin
plugin 0.30.0 enabled dokku core plugin plugin
proxy 0.30.0 enabled dokku core proxy plugin
ps 0.30.0 enabled dokku core ps plugin
redirect 0.7.1 enabled Plugin for managing application redirects
registry 0.30.0 enabled dokku core registry plugin
repo 0.30.0 enabled dokku core repo plugin
resource 0.30.0 enabled dokku core resource plugin
run 0.30.0 enabled dokku core run plugin
scheduler 0.30.0 enabled dokku core scheduler plugin
scheduler-docker-local 0.30.0 enabled dokku core scheduler-docker-local plugin
scheduler-null 0.30.0 enabled dokku core scheduler-null plugin
shell 0.30.0 enabled dokku core shell plugin
ssh-keys 0.30.0 enabled dokku core ssh-keys plugin
storage 0.30.0 enabled dokku core storage plugin
trace 0.30.0 enabled dokku core trace plugin
traefik-vhosts 0.30.0 enabled dokku core traefik-vhosts plugin
=====> test app-json information
App json computed selected: app.json
App json global selected: app.json
App json selected:
=====> test app information
App created at: 1676630650
App deploy source:
App deploy source metadata:
App dir: /home/dokku/test
App locked: false
=====> test builder information
Builder build dir:
Builder computed build dir:
Builder computed selected:
Builder global build dir:
Builder global selected:
Builder selected:
=====> test builder-dockerfile information
Builder dockerfile computed dockerfile path: Dockerfile
Builder dockerfile global dockerfile path: Dockerfile
Builder dockerfile dockerfile path:
=====> test builder-lambda information
Builder lambda computed lambdayml path: lambda.yml
Builder lambda global lambdayml path: lambda.yml
Builder lambda lambdayml path:
=====> test builder-pack information
Builder pack computed projecttoml path: project.toml
Builder pack global projecttoml path: project.toml
Builder pack projecttoml path:
=====> test buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest-20
Buildpacks global stack:
Buildpacks list:
Buildpacks stack:
=====> test ssl information
Ssl dir: /home/dokku/test/tls
Ssl enabled: false
Ssl hostnames:
Ssl expires at:
Ssl issuer:
Ssl starts at:
Ssl subject:
Ssl verified:
=====> test checks information
Checks disabled list: none
Checks skipped list: none
Checks computed wait to retire: 60
Checks global wait to retire: 60
Checks wait to retire:
=====> test cron information
Cron task count: 0
=====> test docker options information
Docker options build:
Docker options deploy: --restart=on-failure:10
Docker options run:
=====> test domains information
Domains app enabled: true
Domains app vhosts: test.dokku.me www.test.de
Domains global enabled: true
Domains global vhosts: dokku.me
=====> test git information
Git deploy branch: main
Git global deploy branch: master
Git keep git dir: false
Git rev env var: GIT_REV
Git sha:
Git source image:
Git last updated at:
=====> test logs information
Logs computed max size: 10m
Logs global max size: 10m
Logs global vector sink:
Logs max size:
Logs vector sink:
=====> test network information
Network attach post create:
Network attach post deploy:
Network bind all interfaces: false
Network computed attach post create:
Network computed attach post deploy:
Network computed bind all interfaces: false
Network computed initial network:
Network computed tld:
Network global attach post create:
Network global attach post deploy:
Network global bind all interfaces: false
Network global initial network:
Network global tld:
Network initial network:
Network static web listener:
Network tld:
Network web listeners: 172.17.0.4:5000
=====> test nginx information
Nginx access log format:
Nginx access log path: /var/log/nginx/test-access.log
Nginx bind address ipv4:
Nginx bind address ipv6: ::
Nginx client max body size:
Nginx disable custom config: false
Nginx error log path: /var/log/nginx/test-error.log
Nginx global hsts: true
Nginx computed hsts: true
Nginx hsts:
Nginx hsts include subdomains: true
Nginx hsts max age: 15724800
Nginx hsts preload: false
Nginx computed nginx conf sigil path: nginx.conf.sigil
Nginx global nginx conf sigil path: nginx.conf.sigil
Nginx nginx conf sigil path:
Nginx proxy buffer size: 4096
Nginx proxy buffering: on
Nginx proxy buffers: 8 4096
Nginx proxy busy buffers size: 8192
Nginx proxy read timeout: 60s
Nginx last visited at:
Nginx x forwarded for value: $remote_addr
Nginx x forwarded port value: $server_port
Nginx x forwarded proto value: $scheme
Nginx x forwarded ssl:
=====> test proxy information
Proxy enabled: true
Proxy port map: http:80:5000
Proxy type: nginx
=====> test ps information
Deployed: true
Processes: 1
Ps can scale: true
Ps computed procfile path: Procfile
Ps global procfile path: Procfile
Ps procfile path:
Ps restart policy: on-failure:10
Restore: true
Running: true
Status web 1: running (CID: 6019ff2c016)
=====> test registry information
Registry computed image repo: dokku/test
Registry computed push on release: false
Registry computed server:
Registry global push on release:
Registry global server:
Registry image repo:
Registry push on release:
Registry server:
Registry tag version:
=====> test resource information
=====> test scheduler information
Scheduler computed selected: docker-local
Scheduler global selected: docker-local
Scheduler selected:
=====> test scheduler-docker-local information
Scheduler docker local disable chown:
Scheduler docker local init process: true
Scheduler docker local parallel schedule count:
=====> test storage information
Storage build mounts:
Storage deploy mounts:
Storage run mounts:
please let me know if you need more detailed info!
dokku ps:inspect APP_NAME
dokku nginx:show-config APP_NAME
dokku trace:on
trace:on
will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXX):I tried this promising plugin and added a domain such as ...
www.domain.ltd -> domain.ltd
but when i dokku ps:restart
the project it crashes because of the plugin ...
-----> Creating https nginx.conf
-----> Running nginx-pre-reload
/var/lib/dokku/plugins/enabled/redirect/nginx-pre-reload: line 28: get_nginx_location: command not found
Suppose you have two domains;
example.io and example.com
and you want to direct all traffic to example.io such that all the following is true;
example.com is just an alias in that you want it there to capture traffic but you want your visitors to end up on example.io. When you throw letsencrypt into the mix you end up with Nginx throwing warnings as the required domains interfere with the redirects that this plugin puts in place.
To setup letsencrypt for the https://(www)?\.example\.(io|com)
you need to add the domains via the dokku domains
functionality. You'll also need to add redirects via dokku redirect
but when you do this Nginx starts warning about duplicate server names.
nginx: [warn] conflicting server name "www.example.io" on [::]:80, ignored
nginx: [warn] conflicting server name "www.example.com" on [::]:80, ignored
nginx: [warn] conflicting server name "example.com" on [::]:80, ignored
nginx: [warn] conflicting server name "www.example.io" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.example.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "example.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.example.io" on [::]:443, ignored
nginx: [warn] conflicting server name "www.example.com" on [::]:443, ignored
nginx: [warn] conflicting server name "example.com" on [::]:443, ignored
nginx: [warn] conflicting server name "www.example.io" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "www.example.com" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "example.com" on 0.0.0.0:443, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
@josegonzalez suggests that it could be possible to inject domains from this redirect plugin into the letsencrypt domain list so so that it not necessary to add them via dokku domains
Most core plugins respond to dokku <plugin-name>:help
, while this plugin puts its help text at the bottom of the main dokku help
listing.
With redirect from www.test.com
to test.com
, this malformed log message is printed:
Configuring redirect for www.test.com to via HTTP 301...
On the host:
# dokku apps:create test
-----> Creating test... done
# dokku redirect:set test www.test.com test.com
-----> Setting redirect for test...
Done
On the devops machine:
~ cd tmp
~/tmp mkdir test
~/tmp cd test
~/tmp/test touch .static
~/tmp/test echo test > index.html
~/tmp/test git init .
Initialized empty Git repository in /Users/semenov/tmp/test/.git/
~/tmp/test ⎇ master … git add .
~/tmp/test ⎇ master ~ git ci -m "test"
[master (root-commit) d1893f9] test
2 files changed, 1 insertion(+)
create mode 100644 .static
create mode 100644 index.html
~/tmp/test ⎇ master git push [email protected]:test master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 257 bytes | 257.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Preparing /tmp/dokku_git.b03a (identifier dokku_git.b03a)
remote: ~/test /tmp/dokku_git.b03a ~/test
remote: /tmp/dokku_git.b03a ~/test
-----> Cleaning up...
-----> Building test from herokuish...
....
....
-----> Configuring test.localhost...(using built-in template)
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
-----> Configuring redirect for www.test.com to via HTTP 301...
Reloading nginx
The redirect works, the problem is only in the output.
-----> Configuring redirect for www.test.com to test.com via HTTP 301...
Ubuntu 18.04
Dokku version 0.12.9
Dokku-redirect 607615c ("Release 0.6.1")
# cat /home/dokku/test/REDIRECTS
www.test.com:test.com:301
# grep 301 /home/dokku/test/nginx.conf
return 301 $scheme://test.com$request_uri;
When I try to remove a redirection, I got a sed error as following:
root@vps:/# dokku redirect my_website
SOURCE DESTINATION CODE
website.com/ms website.com/product/ms 301
root@vps:/# dokku redirect:unset my_website website.com/ms
-----> Unsetting redirect for my_website...
sed: -e expression #1, char 28: unknown command: `m'
On a fresh Dokku 0.6.5 install, dokku redirect:set app www.app.com app.com
generates invalid nginx config:
server {
listen [::]:;
listen ;
server_name www.app.com;
return 301 $scheme://app.com$request_uri;
}
which gives this nginx error:
nginx: [emerg] invalid port in "[::]:" of the "listen" directive in /home/dokku/app/nginx.conf:38
nginx: configuration file /etc/nginx/nginx.conf test failed
This is because in redirect.conf
you rely on NGINX_PORT
, and starting from Dokku 0.6 you need to look up PROXY_PORT_MAP
for the port (see how the core plugin does that at https://github.com/dokku/dokku/blob/master/plugins/nginx-vhosts/templates/nginx.conf.sigil)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.