Skip to content

Datasette as a service #12

@ross-spencer

Description

@ross-spencer

If need be, we can run the utility as a service with something like this:

# datasette.service
[Unit]
Description=datasette
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/python -m http.server 80 --d /home/spencer/git/simonw/datasette-lite

[Install]
WantedBy=multi-user.target
● datasette.service - datasette
     Loaded: loaded (/etc/systemd/system/datasette.service; disabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-03-13 14:35:11 CET; 2min 9s ago
   Main PID: 2046176 (python)
      Tasks: 1 (limit: 4609)
     Memory: 26.4M
     CGroup: /system.slice/datasette.service
             └─2046176 /usr/bin/python -m http.server 80 --d /home/spencer/git/simonw/datasette-lite

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions