I usually connect with my server via ssh in a terminal and run basic commands. What’s a better, more efficient and modern way of doing that? Especially considering ai and documentation along the way? I wonder if there’s a better approach than “connect from remote and act local”. Is there a method to “code local and push to remote”?

I use a fedora server with podman, caddyfile and vi.

  • beliquititious@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    14 days ago

    There are probably multiple flashy clients and gui’s for it, but if you’re already used to the terminal, I’d recommend rsync. This might be the wrong syntax but something like rsync -av ~/local/project servername:/var/www/html/ would take your local files and update the web directory of your server with only the files that are more recent. Rsync will even read your ssh config file so if you’re got an entry for your server you can just use the host name.

    I ran a little blog for a while using a static site generator so I setup the git server on my web server and wrote a git hook where every time I pushed to the repo the server would pull it’s cloned copy of the repo into the html directory. Took me a few hours to setup but it made updating the blog as simple as pushing to the repo.