From a7ef03a17bb8600bd01bbedeb7bd51090b0d2a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20B=C3=BClow?= Date: Mon, 29 Jan 2024 09:22:59 +0100 Subject: [PATCH] added pipeline and systemd file --- .woodpecker.yaml | 31 +++++++++++++++++++++++++++++++ exampleconfig.yaml | 3 ++- podterminal.service | 21 +++++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .woodpecker.yaml create mode 100644 podterminal.service diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..31389cf --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,31 @@ +when: + branch: main + +variables: + - &file Dockerfile + +steps: + build: + image: docker.io/golang:bookworm + commands: + - apt-get update + - apt-get install -y make gcc libgpgme-dev build-essential pkgconf pkgconf-bin libdevmapper-dev libbrtrfs-dev + - go mod download + - go mod tidy + - CGO_ENABLED=1 go build -buildvcs=true . + when: + event: [ pull-request, push] + publish: + image: woodpeckerci/plugin-gitea-release + settings: + base_url: https://git.jmbit.de + files: + # Could also be "hello-world*" to match both + - "podterminal" + - "exampleconfig.yaml" + api_key: + from_secret: FORGEJO_TOKEN + target: main + when: + event: push + diff --git a/exampleconfig.yaml b/exampleconfig.yaml index e35f998..8656480 100644 --- a/exampleconfig.yaml +++ b/exampleconfig.yaml @@ -1,11 +1,12 @@ dir_node: /dev/dri/renderD128 # Enable DIR passthrough to enable GPU accelleration in Container dri: false -# Environment Variables +# Environment Variables to be passed to the container. envvars: CUSTOM_USER: user PASSWORD: "" TITLE: Podterminal + # HTTP_PROXY: 192.168.0.10 # Container Image you want to use image: lscr.io/linuxserver/webtop diff --git a/podterminal.service b/podterminal.service new file mode 100644 index 0000000..b49e170 --- /dev/null +++ b/podterminal.service @@ -0,0 +1,21 @@ +[Unit] +Description=Simple Terminal Server using Webtop Containers and Podman +After=podman.service + +[Service] +ExecStart=/usr/local/bin/podterminal +Type=Simple +Restart=on-failure +DeviceAllow=/dev/dri/renderD128 +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictSUIDSGID=true +ProtectClock=true +PrivateTmp=true +ReadWritePaths=/run/podman/podman.sock + + +[Install] +WantedBy=multi-user.target