Want to serve a static file at the root of your Discourse server?
Here’s what to do. In the bottom of your
app.yml file, down in the custom commands section, do something like this:
## Remember, this is YAML syntax - you can only have one block with a name run: - exec: echo "Beginning of custom commands" - file: path: /var/www/discourse/public/myfile.txt chmod: "+r" contents: | Stuff that's in the file goes here. - exec: echo "End of custom commands"
. /launcher rebuild app
The file will then be accessible as http://yourserver.com/myfile.txt