Several users are struggling to upload a file to the web root in a Docker-based Discourse installation. enry needs to upload an SSL certificate activation file and a Google verification file, but finds the process overly complex.
vhamon attempted to upload a .txt file to the /var/discourse/shared/standalone directory but was unsuccessful. However, they later found a solution by adding a custom command in app.yml to create the file in the /var/www/discourse/public directory.
Ryan_Nix was able to create a .txt file for domain verification, but didn’t share the exact steps. lt100 asked for clarification, and Ryan_Nix eventually revealed that they used a TXT record at their DNS provider instead.
Conclusion
The consensus among users and moderators is that using DNS records for domain verification is easier and more recommended. However, some services like formspree.io require a .txt file for verification.
According to codinghorror, it’s not possible to create a file in the web root on a Docker install, and the DNS method is the only way. coleVsCode noted that Formspree no longer requires root-level text file verification.
I need to upload a file to the web root, specifically, some SSL certificate activation file. On every other webapp I’ve ever used in my 15+ years of working in web, I could relatively easily do this with varying degree of difficulty. Only with this docker+discourse ruby thing are things so incredibly layered that I feel I need to learn 12 different things just to upload a file to a web root.
@wesochuck thanks for the fast reply. Unsure if I should add to the other post or post here, but we have a number of files that must be placed in the root <== emphasis here, as adding some subfolder that get symlinked through voodoo magic is not what I’m looking for.
In addition to the SSL verification file that our CA wants, we also have to put a google verification file. Yes I know GWT has DNS mechanism but that is more painful. Also others suggested a subdomain hosted in a normal webserver. This all seems like a painful workaround for something that should not be this hard!
But let me take a step backwards here. I would like to think I have a pretty good idea of Linux, hosting, VM, etc… Is there some architecture document on this docker thing ? Something more than marketing (https://www.docker.com/what-docker) but more educational than “stfu and type these commands” (What is Docker? | Docker Docs).
I tried to put a .txt file into /var/discourse/shared/standalone, giving it www-data read rights. After rebuilding app, the file is still not available to public. Nginx need to be configured ? How ? Any help would be greatly appreciated.
I’m still struggling to find a way to upload a domain verification for Mailjet. I can’t create a subdomain, so I would prefer the txt file method of verification. Where can I place the .txt file within the Discourse folder?
I’m sorry, there is no mention of this feature in their docs.
Verification txt is required when a user creates a form to accept requests ‘site-wide’ (from mywebsite.com/*) and not from specific pages (e.g., mywebsite.com/login).
Unfortunately not, I’m not a skilled webdev, just trying to use whatever services are available.
Thank you for taking the time to answer me though, I’ll get in touch with formspree and ask whether they can verify my website through DNS records, or manually.