Hi, i want install Discourse, i have docker but i need change the port server from 80:80 for 10080:80 because my por 80 is not free.
In you app.yml edit :
expose:
- “10080:80”
- “2222:22”
And
./launcher rebuild app
Thank’s for the answer @Vernam
Is there a way to so this in the ./discourse-setup step?
I’d like to have the alternate port set right from the start rather than having to rebuild.
Don’t run discourse-setup, edit app.yml directly, run launcher bootstrap app.
thanks, that’s easier than mucking about with templates!
Copy the sample file
sudo cp samples/standalone.yml containers/app.yml
open it
sudo nano containers/app.yml
and change the port on line 23
- "8080:80" # http
rebuild it
./launcher bootstrap app
You sir a white knight! Ty a million!
Unfortunately this changed port is not considered, and it navigates me to http://mercury/finish-installation/confirm-email instead of http://mercury:3333/finish-installation/confirm-email.
Also the http://mercury:3333/u/activate-account/ page is broken, nothing happens if I click the “Click here to activate your account” button.
Console log for the confirmation page:
Loading failed for the <script> with source “http://mercury:3333/assets/ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js”. confirm-email:5:1
Loading failed for the <script> with source “http://mercury:3333/assets/wizard-vendor-478203d0e6de278e15e12305ec1c7cc58c60f41a3ceb4c32683113e199fe575c.js”. confirm-email:7:1
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). Source: ;!function(){var t,e,n,o=0,u=function(t,e){return"function"!=typeof t||t.replaced?t:(e.replaced=!0,e)};if("undefined"!=typeof CustomEvent&&"function"==typeof window.dispatchEvent){var r=function(t){try{if("object"==typeof t&&(t=JSON.stringify(t)),"string"==typeof t)return window.dispatchEvent(new CustomEvent("lprequeststart",{detail:{data:t,requestID:++o}})),o}catch(t){}},s=function(t){try{window.dispatchEvent(new CustomEvent("lprequestend",{detail:t}))}catch(t){}};"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest.prototype&&XMLHttpRequest.prototype.send&&(XMLHttpRequest.prototype.send=u(XMLHttpRequest.prototype.send,(n=XMLHttpRequest.prototype.send,function(t){var e=this,o=r(t);return o&&e.addEventListener("loadend",function(){s({requestID:o,statusCode:e.status})}),n.apply(e,arguments)}))),"function"==typeof fetch&&(fetch=u(fetch,(e=fetch,function(t,n){var o=r(n),u=e.apply(this,arguments);if(o){var c=function(t){s({requestID:o,statusCode:t&&t.status})};u.then(c).catch(c)}return u})));var c=function(t){return u(t,function(){try{this.dispatchEvent(new CustomEvent("lpsubmit"))}catch(t){}return t.apply(this,arguments)})},i=function(){if(document&&document.forms&&document.forms.length>0)for(var t=0;t<document.forms.length;++t)document.forms[t].submit=c(document.forms[t].submit)};document&&"interactive"===document.readyState||"complete"===document.readyState?i():window.addEventListener("DOMContentLoaded",i,!0),Document.prototype.createElement=u(Document.prototype.createElement,(t=Document.prototype.createElement,function(){var e=t.apply(this,arguments);return e&&"FORM"===e.nodeName&&e.submit&&(e.submit=c(e.submit)),e}))}}();. confirm-email:1:1
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). Source: ;(function(e){if(!e.__REACT_DEVTOOLS_GLOBAL_HOOK__){var n=!1,t={_renderers:{},helpers:{},checkDCE:function(e){try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&(n=!0,setTimeout(function(){throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://fb.me/react-perf-use-the-production-build")}))}catch(e){}},inject:function(e){var r=Math.random().toString(16).slice(2);t._renderers[r]=e;var o=n?"deadcode":function(e){try{if("string"==typeof e.version)return e.bundleType>0?"development":"production";var n=Function.prototype.toString;if(e.Mount&&e.Mount._renderNewRootComponent){var t=n.call(e.Mount._renderNewRootComponent);return 0!==t.indexOf("function")?"production":-1!==t.indexOf("storedMeasure")?"development":-1!==t.indexOf("should be a pure function")?-1!==t.indexOf("NODE_ENV")?"development":-1!==t.indexOf("development")?"development":-1!==t.indexOf("true")?"development":-1!==t.indexOf("nextElement")||-1!==t.indexOf("nextComponent")?"unminified":"development":-1!==t.indexOf("nextElement")||-1!==t.indexOf("nextComponent")?"unminified":"outdated"}}catch(e){}return"production"}(e);return t.emit("renderer",{id:r,renderer:e,reactBuildType:o}),r},_listeners:{},sub:function(e,n){return t.on(e,n),function(){return t.off(e,n)}},on:function(e,n){t._listeners[e]||(t._listeners[e]=[]),t._listeners[e].push(n)},off:function(e,n){if(t._listeners[e]){var r=t._listeners[e].indexOf(n);-1!==r&&t._listeners[e].splice(r,1),t._listeners[e].length||(t._listeners[e]=null)}},emit:function(e,n){t._listeners[e]&&t._listeners[e].map(function(e){return e(n)})},supportsFiber:!0,_fiberRoots:{},getFiberRoots:function(e){var n=t._fiberRoots;return n[e]||(n[e]=new Set),n[e]},onCommitFiberUnmount:function(e,n){t.helpers[e]&&t.helpers[e].handleCommitFiberUnmount(n)},onCommitFiberRoot:function(e,n){var r=t.getFiberRoots(e),o=n.current,i=r.has(n),u=null==o.memoizedState||null==o.memoizedState.element;i||u?i&&u&&r.delete(n):r.add(n),t.helpers[e]&&t.helpers[e].handleCommitFiberRoot(n)}};Object.defineProperty(e,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{value:t})}}(window))
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeObjectCreate = Object.create;
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeMap = Map;
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeWeakMap = WeakMap;
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeSet = Set;
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.on('renderer', function(evt) {
window.postMessage({
source: 'react-devtools-detector',
reactBuildType: evt.reactBuildType,
}, '*');
});
. confirm-email:1:1
Content Security Policy: The page’s settings blocked the loading of a resource at http://mercury:3333/assets/ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js (“script-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at http://mercury:3333/assets/wizard-vendor-478203d0e6de278e15e12305ec1c7cc58c60f41a3ceb4c32683113e199fe575c.js (“script-src”).
We don’t support running Discourse in a non-standard (80/443) port.
Changing the port in the app.yml file is there to allow you to use a reverse proxy that will listen in a standard port and forward traffic internally to the higher port.
That is an advanced setup and we recommend just using the official guide for people who aren’t familiar with server administration.
Running Discourse front end on a custom port is not something we support, you can export it out of docker under a different port and then have the load balancer fix it. BUT having the final place users in production visit be http://magic.com:8922 is not something we support.
someone can show how to do this…please
您好,我的网站运行在 80 端口。我已将 discourse 网站迁移到 8080 端口,但它会重定向到主网站。
已经是 2024 年了,这方面有进展吗?
这是什么?运行 Discourse 并使用外部反向代理控制 Web 端口是受支持的,我们甚至还提供了一个模板,该模板在监听 Unix 套接字的同时运行 Discourse,以使集成无缝进行。
此主题已自动关闭,3249 天后。不再允许回复。