Serving hugo static site in same docker container?


(tvmaly) #1

I setup discourse on a DO droplet, but it is currently running on the main domain.

Is there a detailed write up on how to setup the docker container so that I could serve a static html site on the main domain and provide discourse on a subdomain.


(Jay Pfaffman) #2

Perhaps you needed to add #howto to your searches. Running other websites on the same machine as Discourse


(tvmaly) #3

I did come across that post, but as my first post on this forum I could not yet provide a link as a reference.

My main challenge is figuring out how to change the docker setup to mount the local area the html and assets would be stored in. I am using the DO one click install of discourse, will I have to use a different setup or can I use this?


(Felix Freiberger) #4

Don’t try to get your static site into Discourse’s own container, this will end in tears.

Instead, follow the steps @pfaffman linked to, then get the outer Nginx instance on the host to serve everything else :slight_smile:


(tvmaly) #5

Will having a second nginx on a smaller sized $10 droplet have a noticeable impact on performance?


(Felix Freiberger) #6

No, Nginx has quite a low performance impact, especially if it’s just acting as a reverse proxy and serving some static files :slight_smile:


(Jay Pfaffman) #7

That’s what everybody else does.


(tvmaly) #8

@pfaffman @fefrei thanks, I will go this route.