deploy
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
FROM alpine:3.20
|
||||
|
||||
RUN apk add --no-cache \
|
||||
ttyd \
|
||||
bash \
|
||||
openssh-client \
|
||||
curl \
|
||||
jq \
|
||||
sshpass
|
||||
|
||||
WORKDIR /app
|
||||
COPY tools/pi_control/terminal_entry.sh /app/tools/pi_control/terminal_entry.sh
|
||||
RUN chmod +x /app/tools/pi_control/terminal_entry.sh
|
||||
|
||||
EXPOSE 7681
|
||||
|
||||
ENTRYPOINT ["ttyd", "--url-arg", "--base-path", "/ttyd", "/app/tools/pi_control/terminal_entry.sh"]
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
APP_ENV="${APP_ENV:-staging}"
|
||||
|
||||
if [ "$APP_ENV" = "live" ]; then
|
||||
SCRIPT="/app/live/tools/pi_control/terminal_entry.sh"
|
||||
else
|
||||
SCRIPT="/app/staging/tools/pi_control/terminal_entry.sh"
|
||||
fi
|
||||
|
||||
if [ ! -f "$SCRIPT" ]; then
|
||||
echo "terminal_entry.sh not found at $SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec ttyd --writable --url-arg "$SCRIPT"
|
||||
Reference in New Issue
Block a user