{"id":18089007,"url":"https://github.com/eriksjolund/user-systemd-service-actions-workflow","last_synced_at":"2025-04-13T04:35:10.933Z","repository":{"id":47726018,"uuid":"328432233","full_name":"eriksjolund/user-systemd-service-actions-workflow","owner":"eriksjolund","description":"GitHub Actions workflow that runs a socket-activated echo server with Podman in a user systemd service","archived":false,"fork":false,"pushed_at":"2024-05-24T05:44:53.000Z","size":13,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T21:22:58.107Z","etag":null,"topics":["demo","echo-server","github-actions","podman","socket-activation","systemd","systemd-service"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eriksjolund.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-10T16:51:59.000Z","updated_at":"2024-11-27T12:35:48.000Z","dependencies_parsed_at":"2022-07-26T10:32:47.462Z","dependency_job_id":null,"html_url":"https://github.com/eriksjolund/user-systemd-service-actions-workflow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriksjolund%2Fuser-systemd-service-actions-workflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriksjolund%2Fuser-systemd-service-actions-workflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriksjolund%2Fuser-systemd-service-actions-workflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriksjolund%2Fuser-systemd-service-actions-workflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eriksjolund","download_url":"https://codeload.github.com/eriksjolund/user-systemd-service-actions-workflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248664261,"owners_count":21141922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","echo-server","github-actions","podman","socket-activation","systemd","systemd-service"],"created_at":"2024-10-31T17:42:35.599Z","updated_at":"2025-04-13T04:35:10.911Z","avatar_url":"https://github.com/eriksjolund.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"### GitHub Actions workflow to demonstrate how to run a user systemd service\n\nThe tested echo server container [__ghcr.io/eriksjolund/socket-activate-echo__](https://github.com/eriksjolund/socket-activate-echo/pkgs/container/socket-activate-echo \n) supports _socket activation_.\n\nUsing [socket activation](https://github.com/containers/podman/blob/main/docs/tutorials/socket_activation.md) has\nthe advantage that there is no need for the client to use _/usr/bin/sleep_ combined with a while-loop to check if the server is online.\n\nThe file [.github/workflows/demo.yml](.github/workflows/demo.yml) contains:\n\n```\nname: Echo server demo with podman and systemd\non: \n  push:\n    branch:\n      - main\njobs:\n  systemd_podman_echo_server_demo:\n    runs-on: ubuntu-24.04\n    permissions:\n      contents: read\n    steps:\n      - name: Run actions/checkout for this repo\n        uses: actions/checkout@v4\n        with:\n          path: checkout\n          persist-credentials: false\n      - name: Run an echo server with podman in a user systemd service\n        run: |\n          sudo apt-get update\n          sudo apt-get install -y socat\n          podman pull ghcr.io/eriksjolund/socket-activate-echo:latest\n          mkdir -p ~/.config/containers/systemd\n          mkdir -p ~/.config/systemd/user\n          cp checkout/echo.container ~/.config/containers/systemd\n          cp checkout/echo.socket ~/.config/systemd/user/\n          systemctl --user daemon-reload\n          systemctl --user start echo.socket\n          echo hello | socat - tcp4:127.0.0.1:3000\n          echo hello | socat - tcp6:[::1]:3000\n          echo hello | socat - udp4:127.0.0.1:3000\n          echo hello | socat - udp6:[::1]:3000\n          echo hello | socat - unix:$HOME/echo_stream_sock\n          echo hello | socat - VSOCK-CONNECT:1:3000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriksjolund%2Fuser-systemd-service-actions-workflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feriksjolund%2Fuser-systemd-service-actions-workflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriksjolund%2Fuser-systemd-service-actions-workflow/lists"}