Closed wilson29thid closed 3 years ago
I got this working by modifying containers/app.yml
to add:
hooks: # this line already exists
after_ssl:
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: "location @discourse {"
to: |
location /discussion/ {
return 301 https://$$ENV_VANILLA_HOSTNAME$request_uri;
}
location @discourse {
after_code: # this line already exists
I also added a line above with the other environment variables:
env: # this line already exists
VANILLA_HOSTNAME: forums.29th.org
We'll have to change it to vanilla.29th.org
(or whatever we call it) when we switch/launch.
After modifying this, we just run:
./launcher rebuild app
Now to figure out how to version control that 🤔
Requests to URLs like:
Should redirect to:
(Or whatever subdomain we end up using)
Here's a clue on how to do this.
I've manually modified
/etc/nginx/conf.d/discourse.conf
in theapp
container and got it working with this bit just before the closing}
:Now just need to get that added via the
app.yml
.