maplibre / martin

Blazing fast and lightweight PostGIS, MBtiles and PMtiles tile server, tile generation, and mbtiles tooling.
https://martin.maplibre.org
Apache License 2.0
2.33k stars 216 forks source link

Learner's question - how do I get the CLI to survive a reboot on Linux (maybe a systemd service file)? #1574

Closed bouton closed 1 week ago

bouton commented 2 weeks ago

Sorry - new to Linux and trying this out.

I have Martin up and running displaying all my tiles with maplibre. Lovely.

To keep it running in the background I run it with an ampersand at the end of the command eg martin /path/etc &

But a reboot requires me to re-enter the command.

I have read up that maybe I can run it as a systemd service. Is this possible?

Do you have an example service file and/or some suggestions? Thanks

CommanderStorm commented 2 weeks ago

Deploying this as a systemd service is not quite the simplest solution imo (might be biased). I would suggest looking into docker instead. Much simpler than the systemd docs.

If you still want to go via the systemd route, I would need a few additional pieces of information:

bouton commented 1 week ago

Thanks. Will look into docker per your suggestion. Thanks

On Fri, Nov 15, 2024, 11:04 PM Frank Elsinga @.***> wrote:

Deploying this as a systemd service is not quite the simplest solution imo (might be biased). I would suggest looking into docker instead. Much simpler than the systemd docs https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html .

If you still want to go via the systemd route, I would need a few additional pieces of information:

  • what are your datasources (affects what startup is blocked by)
  • if using the --auto-bounds parameter: what is the datasources size and is extent indexed (affects startup time)
  • when do you need it to start up (affects what startup is blocked by; immediately after networking, or is your system constrained on resources and another service start first. martins resource usage is low => should not affect you much if at all)

— Reply to this email directly, view it on GitHub https://github.com/maplibre/martin/issues/1574#issuecomment-2480104426, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUYZOOPUU52PIPZJ5IFO3L2AZ4WXAVCNFSM6AAAAABRSLOHGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBQGEYDINBSGY . You are receiving this because you authored the thread.Message ID: @.***>