As the title suggests, I'm looking to setup my domain and subdomain today.
Let's pretend I have domain.com and forum.domain.com. Is it possible to do the one-click install for Wordpress on the primary domain.com and then do another one-click install for Discourse on forum.domain.com?
I run a couple projects on Digital Ocean so I do have experience with the platform. This is actually a pretty interesting use case and you aren't alone. Looks like there's a feature request for something similar.
As of now, I don't believe there's an easy way to execute multiple one-click installs on the same DO instance. You can do it easily using 2 separate instances and routing the root domain to a Wordpress blog and the subdomain to Discourse.
You can also do all of this on 1 instance but you'll only be able to utilize the one-click install for either Wordpress or Discourse, but not both simultaneously. You'll have to manually install the second. Check out this guide for instructions. I've never had to do this myself so I'd be curious to hear how easy/difficult it is to set up on DO!
There may be a way to hack the deployment using multiple base images on the same instance but it's probably more trouble than it's worth.
What would be considered the 'correct' way to do this, two droplets or the manual install on subdomain on the same instance?
The reason I ask is because I don't want to make this unnecessarily complex if it doesn't need to be. I wanted Wordpress installed only so I could setup a landing page for my site, and then in the future maybe some blog posts, content pages, etc.
Immediate need is literally just for a landing page though. The bulk of content and primary function of the site, for now, will be the Discourse forum running at forum.domain.com.
Great question. It's a difficult one to answer because best practices are subjective here. I'll offer two responses, purely technical/engineering followed by a more practical Indie Hacker answer.
Assuming you have enough resources (money and time to manage servers) then the optimal solution is to deploy 2 DO servers. Deploying multiple, non-containerized applications to a single server will become needlessly complex. You could always look into deploying a Kubernetes cluster and deploying multiple containerized versions of Wordpress and Discourse. Digital ocean is rolling out a new managed Kubernetes service but it won't be available until later this year. Taking this route will allow you to deploy multiple apps to the same cluster. Frankly, it's way too much firepower for what you need here :)
If you're looking to cut costs, get to market quickly, and not worry about managing a lot of infrastructure for these apps then I wouldn't even recommend rolling your own server for the landing page. Instead, use Carrd. The Pro plan is well worth it and will save you a ton of time and money. Then you can one-click deploy your Discourse forum and call it a day! I know a Discourse hosted by discourse.org is $100/month so I understand that deploying your own is the most frugal option. If you find yourself spending too much time on infrastructure management (let's say you run into scaling issues, a problem I hope you run into at some point!) then I'd take a step back and do a more rigorous cost/benefit analysis. Good luck!
Great suggestion, I have done the exact combo carrd+one click install of Discourse on Digital Ocean.
Fast, easy and affordable
Unfortunately, there's no built in one-click way to do that on the same server in DO.
If you're happy to have two servers then, you can absolutely do that.
Alternatively, if you only want one server then I'd suggest running them in containers.
I'm not sure if you've ever had any experience with Docker but that'd probably be the easiest solution imo: spin up a Wordpress container and spin up a Discourse container
If you'd like some help, let me know, my startup is in the area.
Hi,
This is definitely possible and worth learning how to do, you can't do a one click install for both but don't be afraid to set it up yourself.
Think of it just like running both on your local computer and you just need to point the subdomain to a different area. You want to have an A record for domain.com and forum.domain.com both pointing to the same droplet. Then (assuming you use Nginx) on your server (ssh in) in /etc/nginx/sites-available you would want two config files : domain.com and forum.domain.com.
domain.com would have this as the server name and then you would set the root to where the files are for wordpress. You would do the same for forum.domain.com (different server name and root directory).
Basically you have a NGINX server block for the domain and subdomain. Have a look here: https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04
Easiest way is probably do a one click install for wordpress and then manually install what is needed for discourse. A lot of SAAS' do this to seperate their marketing site from their app.
I would suggest this over two droplets, only because it means you don't have to worry about having two different servers to start.
you can use serverpilot.io.It is easy to install.It is free and connected to your Digital Ocean droplet.You simply click create many appa that you want, and assign your subdomain to each app.
You'll want to look into your domain's DNS settings.
After creating two droplets, you can set up two "A record"s to point to the respective droplet IP addresses.
I also recommend using DigitalOcean's "Floating IP"s. So you'd have Droplet Public IP --> Public Floating IP --> DNS record.
If you want to replace/migrate your droplet in the future, you can just point the Floating IP to a different droplet.
try https://serverfault.com/questions/tagged/digital-ocean - you will get a crowd more suited to this kind of question.