Small Phoenix websites - most cost efficient deployment options?

Hello everyone,
As a way to pay my bills while attending university, I started a small web design business for local businesses here in Wales. Most of the time I generally just use something like Squarespace simply because it allows me to build quick simple sites, do it cheaply, fast and after going live I rarely have to worry about them.
Now since I have been bitten by the elixir bug, I have done some projects in elixir and Phoenix, and today I got a new client that needs a simple website and I thought why not do it in Phoenix?.
Now, although this website might be extended in the future, right now it is a very simple site that will just have a couple of forms and such and a bunch of static pages. I know phoenix is probably overkill, but I just feel like deploying a full phoenix app and starting small seems smart.
The main problem I have is that these kind of customers want to pay very little and for that reason I am not too keen on managing the application frequently unless I get paid to add content or features.
What would you think is the best deploy and forget platform? should I go with heroku or something along those lines?
I am a total newbie here, so just looking for opinions/suggestions :slight_smile:
Thank you very much
Carlo

2 Likes

Many web design companies start of with a VPS (about £30 a month) and once you get enough clients you could move up to a dedicated server :slight_smile:

I’m not sure how much flexibility you get with a VPS in terms of shell access etc, so you may want to look at cloud hosting providers as that way your client is billed for what they use.

Check out this mega-thread for options:

You may also want to look at Gigalixir: Platform-as-a-Service designed just for Elixir/Phoenix (they also have a free option).

1 Like

Thanks man! I was looking at gigalixir earlier after finding it on the forum :slight_smile: Also thanks for editing the post to make it clearer :slight_smile:

3 Likes

I don’t want to be the party-pooper, but to be honest I wouldn’t want to use Elixir for a client project, unless there was a compelling reason to do so.

Most of the time, a simple CMS (my preference is Statamic or similar) or even static site generator if content updates aren’t a big deal are the best options, purely because they save you a ton of time and can be deployed almost anywhere for pennies. Once up, they are usually bulletproof.

If the site you’re building is just static, then Elixir and Phoenix are massively overkill for the task (static site = static HTML to my mind). If your clients need to edit content, then you have to build out not just the front of the site, but the admin/control panel. Don’t underestimate that, it’s a huge task.

Admittedly I just moved my site from a fully static one to a Phoenix app, but that’s because it’s my own and a pet project. I’m happy to constantly be fiddling with it.

From a business perspective, it’s best to go with the option that meets the clients needs now (don’t overbuild “for the future”), is quick and easy to work with (less time = more money) and stable and cheap in production (you don’t want to be the person they call when it crashes at 4 in the morning).

Just my tuppence worth, but I’ve found life a lot calmer by sticking to simple solutions and the right tool for the job.

5 Likes

Yeah I mentioned it would be overkill, I was just really interested about the process :slight_smile:

Personally I am not a fan of off the shelf CMS systems for client sites unless you know they are alway going to be incredibly simple - because when you want to do something custom, you either can’t or you have to learn their (usually not great) system.

When your client then asks you to add something to their site, and you tell them you can’t or you’ll have to ‘look into it’ it reflects on you and their confidence in you begins to erode. Ideally, when your client calls you and asks for something you want to say it’s not a problem and you’ll send them a quote :smiley:

The only exceptions (for me anyway) are CMS systems based on web frameworks like Rails or Phoenix/Elixir - because in those you usually can do anything you want as they’re just built on top of the framework you are familiar with anyway and might have used otherwise.

4 Likes

I second @AstonJ. I just watched Rob Conery’s keynote from ElixirDaze 2018 today and I think it is partly relevant to this discussion. It contains some good arguments why one would want to go with Elixir. I don’t think you should use Elixir for everything from now on. It’s good to be cautious and consider whether a simple static site generator, a blog engine like Ghost or Wordpress, or another CMS would be a better fit.

I think even if it’s a simple application for now, if it’s custom enough to warrant something more than a static site generator or CMS, you could go with Elixir to build it.

But you’re question was about affordable deployment options. The Gigalixir free plan would probably be enough starting out. If it’s simple and you don’t need clustering even Heroku could work with the Hobby plan for $7/month.

The VPS route will start to make sense if you’re comfortable on the devops side and there are more applications to manage. You could set up a single VPS to host and maintain multiple sites. I usually use Linode (referral link) in these cases since I have been running servers with them for similar jobs for almost 10 years now without any issues. I’ve also used DigitalOcean (also referral, gives you $10 off) from time to time with similarly good experience.

Rob’s talk:

4 Likes

we have a great topic created @jswny. Maybe helps you

2 Likes

I’m the founder of gigalixir.com in case you have any questions or need any help. Also happy to hand out free credits to anyone who upgrades to the standard plan. Just direct message me.

5 Likes

I completely agree, I hate feeling hamstrung by a system, which is why I tend not to use some of the popular systems like Ghost or Wordpress. One limits you, the other forces you to wade through a lot of crap.

I’ve found a nice CMS that is database-less (content stored in markdown files, config in YAML files), 100% version controlled, gives me almost all the tools I need to make everything short of a full-blown app, and is built on Laravel so I get nice extensibility and benefit from the tooling (Forge for server provisioning and management).

It’s a doddle to host and maintain. Even if the worst happened and the server was compromised, I can spin up a new one, with all my client sites in less time than it would take to redirect the DNS.

Is PHP my favourite language? Hell no, but for the most part I don’t need to write it, and it’s actually a very suitable one for the use case.

In an ideal world, I’d always prefer to build a client a custom system (with Elixir). The reality is that often their budget and available time doesn’t make doing so possible, or a good business decision.

I think that’s what this comes down to… a business decision vs. a technical one.

EDIT: I’ve not seen that video @lackac. I know what I’m doing this morning! :joy:


EDIT2: I’ve just watched (half) the video, and think that Rob articulates what I was trying to explain.

All my client projects are about utility and business. I build Statamic sites (PHP - Laravel) for my clients, using my laptop because it’s what makes the most sense from the utility perspective. That’s how I pay my bills and keep a roof over my family’s head. That’s how my clients pay their bills and keep a roof over their family’s heads.

My own projects? They are built with Elixir, Elm on my iPad using Blink as my terminal. I’ll take a look at other languages like Rust and Swift, and see what I can build with them. They use the techniques that I’m learning and experimenting with (event sourcing). They scratch the itch I have as an “explorer” to use Rob’s term. I’m learning about Elixir releases (something I’ve previously struggled with), devops, security and building larger, more formal infrastructure (than is even necessary!).

Maybe one day, some of the things I’m building for myself will have the same utility and efficiencies that I look for in my paid work and I’ll be able to combine the two. Maybe they won’t. The point is that it’s a risk I’m happy to take on my time, but not that of my clients.

1 Like

I would recommend using Nanobox and Digital Ocean, which is the direction that I’m heading in. I don’t like spending much time on dev ops and Nanobox looks really good.

I also use Digital Ocean to host my personal websites. I have deployed a 5$ droplet to host 4 websites builded with Elixir/Phoenix since they offer 1 GB RAM.

Which Laravel-based CMS is it you use?

Statamic. It’s a little different unless you’re used to flat-file systems. But it’s great for this sort of project, plus the community is very much like it is here: super helpful and always enthusiastic.

1 Like

I also enjoy gigalixir and find it to be a great platform for simple, lightweight, and small Elixir/Phoenix apps. I simply havent used the platform enough to evaluate it for bigger projects.

Heroku is also just fine for Phoenix apps, plus it has a richer ecosystem for diagnostic, logging, and metrics tools.

2 Likes