Uploading a file to the web root

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.

Please help? TIA.

1 Like

Maybe this will help?

I’d agree docker adds some complexity for certain tasks, but the stability and ease of install greatly outweigh these drawbacks for me.

4 Likes

@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” (Redirecting…).

Update - Redirecting…

1 Like

Hello,

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.

Thanks in advance,
Valentin.

I found by myself a simple solution by adding a custom command in app.yml :
run :

  • exec : echo “MY_KEY” > /var/www/discourse/public/KEY_NAME.txt
4 Likes

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?

Thanks!

Ryan

3 Likes

Hey @Ryan_Nix - did you find a way to do that? struggling to do the same.

1 Like

Hey @vhamon - can you explin that step by step - not familar with this setup really and need to add a file to root.

In the end, I was able to create the TXT file.

Would you mind sharing how exactly you did it?

Sure. I created a TXT record at my DNS provider Cloudflare which was enough to validate the domain.

1 Like

It’s always going to be easier here to use DNS records for domain verification.

2 Likes

Thanks, unfortunately, the service I use (formspree.io) requires verification with a txt file, and I have no idea how to add it.

Can you point us at something on formspree.io which talks about uploading a txt file?

Can you point us at something on formspree.io which talks about uploading a txt file?

You’re not pointing me toward anything on their site, that’s a screenshot with no context. To be clearer I meant a support page or other document.

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).

(My users use formspree to requests invites)

Where are your users coming from? Do you have another site or application somewhere?

Are there no other more sophisticated methods available to you for enrolement?

1 Like

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.