Add tasks to build script

main
Gerard Braad 2023-06-24 03:35:14 +00:00
parent ef9333852e
commit 5984f62f2e
4 changed files with 37 additions and 1 deletions

View File

@ -5,6 +5,7 @@ USER root
RUN dnf install -y \
docker \
cockpit \
passwd \
make \
npm \
rpm-build \
@ -13,6 +14,8 @@ RUN dnf install -y \
RUN npm install -g yarn
COPY .codesandbox/tailscaled /etc/init.d/taiscaled
USER gbraad
RUN git clone https://github.com/gbraad/dotfiles ~/.dotfiles \

28
.codesandbox/tailscaled Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
set -e
test -x /usr/sbin/tailscaled || exit 0
umask 022
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
case "$1" in
start)
echo "Starting Tailscale VPN"
tailscaled --tun=userspace-networking \
--socks5-server=localhost:3215 \
--outbound-http-proxy-listen=localhost:3214 \
--state=/var/lib/tailscale/tailscaled.state \
--socket=/run/tailscale/tailscaled.sock \
--port 41641 \
2>/dev/null &
tailscale up --authkey=${TAILSCALE_AUTHKEY} \
--netfilter-mode=off \
--ssh
;;
*)
echo "Usage: /etc/init.d/tailscaled {start}"
exit 1
esac
exit 0

View File

@ -8,6 +8,7 @@ RUN useradd -l -u 33333 -G wheel -md /home/gitpod -s /usr/bin/zsh -p gitpod gitp
RUN dnf install -y \
docker \
cockpit \
passwd \
make \
npm \
rpm-build \

View File

@ -8,7 +8,11 @@
"license": "LGPL-2.1",
"scripts": {
"build": "webpack --mode production",
"watch": ""
"rpm": "make rpm",
"watch": "",
"link": "mkdir -p ~/.local/share/cockpit && ln -s $PWD/dist ~/.localshare/share/cockpit/tailscale",
"unlink": "rm ~/.local/share/cockpit/tailscale",
"cockpit": "sudo runuser -u cockpit-wsinstance -- /usr/libexec/cockpit-ws --port=9090 --for-tls-proxy"
},
"devDependencies": {
"@types/react": "^18.2.12",