Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: M1 Mac Mini as local staging server?
4 points by oliverjudge 3 days ago | hide | past | favorite | 5 comments
I've currently got an M1 Mac mini running smart home and other family related software. I was wondering whether there was a good way of running web services on it, specifically for staging web apps.

I realise you can run mostly anything on it natively, but most of the apps I build are for a linux target. I've been looking at Mac Stadium's Orca, but it seems to be locked to their platform.

Does anyone have any good workflows that go from their normal machine > Mac Server > Linux Cloud? I'd be interested to see what the blueprint of that looked like.

I would start with Docker. At least that's what I do, dev/build on Mac, production on Linux.

I agree, I tried going the route of having a separate server to do my dev on, and it's a pain if anything with your network changes, and when you're not at home and connected over a VPN, then you're in a worse position than you would be compared to just spinning up a VPS.

I run Docker on my M1 Macbook Pro and have had no major issues running amd64 images using the M1 specific builds for Docker.

How slow are the amd64 images compared to equivalent arm64 images?

This question is not M1 specific because as others have noted: docker.

I’ve run a fairly sophisticated CI setup for a testing and dev / staging deployment of a django-based web app.

For that project I set up a collection of machines with specific gpu hardware to be available to for deployments based on who committed the code.

If your system is internet connected, you may want to look at GitHub Actions self-hosted runners. This is what I used and it integrates very well into normal dev workflows.

For these, you install docker and github’s client. Then you can set up deployments to your local docker-based environment whenever you commit to a given branch.

This can work well behind a firewall, as the runners are listening for signals from GitHub.

Check out Laravel Valet.

It's a great local dev environment.

You can see details here. https://laravel.com/docs/8.x/valet

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact