I installed Dokku on my Digital Ocean droplet, but did it before setting my dns records, so Dokku was installed on IP. Now I changed my dns record, so site can be accessed through site.com
. I can access my previously created Dokku containers through site.com:port
, how can I change Dokku settings to access my app like this - appname.site.com
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- How to reimport module with ES6 import
- Why is `node.js` dying when called from inside pyt
- How to verify laravel passport api token in node /
相关文章
- node连接远程oracle报错
- 如何通过命令行测试dns反向解析
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
- Log to node console or debug during webpack build
To extend @shirkey answer: you don't need to re-create (destroy and create again) an app in order to apply those changes. You can manually create VHOST file inside
/home/dokku/$APP/
directory (as dokku user) then remove NO_VHOST setting (dokku config:unset $app NO_VHOST
) and changeDOKKU_NGINX_PORT
to 80 (dokku config:set $app DOKKU_NGINX_PORT=80
) and restart the app (dokku ps:restart $app
).$ echo "example.com" > /home/dokku/VHOST
It is indeed not necessary to destroy and recreate apps. First,
dokku domains:report
tells you if global VHOSTS are already enabled or not. If not, runThe first of these adds yourdomain.tld to /home/dokku/HOSTNAME. It should also add it to /home/dokku/VHOST, but it doesn't. So that needs to be done manually. Then tell dokku what (sub)domain you want to access myapp on. The last command sets the NO_VHOST variable for myapp to false.
Per https://github.com/progrium/dokku:
To fix the issue, you will first need to update the /home/dokku/VHOST file, adding the domain name -- this will fix any newly generated deployments, but existing apps will need to be deleted from the /home/dokku directory by name (/home/dokku/foo, /home/dokku/bar, etc.) and redeployed for this change to take effect, since each Dokku application has a separate nginx.conf within those /home/dokku/ paths and those will need to be re-written.