Docker Swarm is very underrated, more for multiple apps but you can of course just have one.
I think this is what MRSK is? There's no Kubernetes. It even installs Docker for you.
I may be ignorant but doesn't that scenario you described encapsulate how MRSK functions?
From the MRSK readme[1]:
Connect to the servers over SSH (using root by default, authenticated by your ssh key)
Install Docker on any server that might be missing it (using apt-get)
Log into the registry both locally and remotely
Build the image using the standard Dockerfile in the root of the application.
Push the image to the registry.
Pull the image from the registry onto the servers.
Ensure Traefik is running and accepting traffic on port 80.
Ensure your app responds with 200 OK to GET /up.
Start a new container with the version of the app that matches the current git version hash.
Stop the old container running the previous version of the app.
Prune unused images and stopped containers to ensure servers don't fill up.
---
Re:MRSK vs. Fly.io
by andrewmutz on Wednesday March 22, 2023 @06:53PM
(#35268171)
I don't think you need to use rails to use MRSK
I wrote something to do just that:
https://gitlab.com/stavros/harbormaster
SSH into the server, run the Docker container, give it a config file with the images you want to run, and it handles everything else automatically.
mrsk doesn't require rails. It makes no assumptions about what you're running, we deploy a golang service with it.
mrsk does require a ruby install on your machine, tho.
Re:MRSK vs. Fly.io
by KingOfCoders on Thursday March 23, 2023 @02:13AM
(#35271023)
I would be very interested in that, do you have a writeup?
I don't think there's a writeup out there, but mrsk just uses docker under the hood. So, if you have a CMD in your Dockerfile, it will use that.
If you have an image that can run multiple things, like a rails app that can run the app process for web traffic by default, but it can also run job workers with the right command, you can provide the cmd in the mrsk config. You can see this in the jobs role in the example: https://github.com/mrsked/mrsk#using-different-roles-for-ser....
Re:MRSK vs. Fly.io
by KingOfCoders on Thursday March 23, 2023 @12:38PM
(#35277397)
Thanks!
> Like, provision Hetzner -> pass the IP address to the tool + a Dockerfile -> your image Just Works on the server and restarts if it crashes.
This is MRSK. It's just that rails now comes with a dockerfile. And your service need a health check.
Dokku[0] does exactly that. Feels a very space to mrsk, but has been around for several years now.
Like, provision Hetzner -> pass the IP address to the tool + a Dockerfile -> your image Just Works on the server and restarts if it crashes.