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