Uploading a file to the web root


(enry) #1

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.


(Wes Osborn) #2

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.


(enry) #3

@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 (What is Docker?) but more educational than “stfu and type these commands” (Redirecting…).


(enry) #4

Update - Redirecting…


(Valentin Hamon) #5

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.


(Valentin Hamon) #6

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

(Bofeng) #7

Thank you, Valentin, the solution works. You saved my day!


(Ryan Nix) #8

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


(Shane O'Donnell) #9

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


(Shane O'Donnell) #10

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


(Ryan Nix) #11

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