slowdive
By:
slowdive

Can I host SMF and Discourse in the same Droplet?

December 8, 2016 470 views
Applications Ubuntu 16.04

I will be migrating from SMF to Discourse but would like to keep SMF just for archive purposes. Can I install both systems in the SAME droplet and if yes, how can I?

2 Answers

This should be possible. Since the recommended Discourse installation runs inside Docker you could the web service hosting SMF to also proxy for Discourse. Personally I prefer Nginx over Apache for acting as a reverse proxy via the proxy_pass configuration.

I use a section in my /etc/nginx/sites-enabled/default file to do this for a Ruby based application I have running on a droplet:

        location / {
        proxy_pass http://localhost:4567;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

In this case, the service is listening for local connections on port 4567. You could configure docker to map the Discourse service to listen on localhost on a port other than 80 or 443 and then map a directory to it using this setup in nginx.

SMF is already installed in a droplet with Apache and the LAMP stack. So for your suggestion, the best would be

1) create another droplet and:

install docker
install discourse
install nginx
install lamp
install SMF?

thanks!

Have another answer? Share your knowledge.