from Hacker News

Ask HN: M1 Mac Mini as local staging server?

by oliverjudge on 6/9/21, 12:25 PM with 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.

  • by aynyc on 6/9/21, 1:59 PM

    I would start with Docker. At least that's what I do, dev/build on Mac, production on Linux.
  • by bredren on 6/10/21, 6:19 AM

    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.

  • by saluki on 6/11/21, 1:32 AM

    Check out Laravel Valet.

    It's a great local dev environment.

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