Files
lunarfront-app/entrypoint-devpod.sh
Ryan Moon b3e67d1483
All checks were successful
Build Devpod / build (push) Successful in 19s
Build & Release / build (push) Successful in 16s
fix: set workdir and code-server root to /root for persistent home
2026-04-04 08:43:36 -05:00

26 lines
565 B
Bash

#!/bin/bash
set -e
# Generate SSH host keys if not present
ssh-keygen -A
# Write authorized keys from env if provided
if [ -n "$SSH_AUTHORIZED_KEYS" ]; then
echo "$SSH_AUTHORIZED_KEYS" > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
fi
# Start SSH daemon
/usr/sbin/sshd
# Start code-server
exec code-server \
--bind-addr 0.0.0.0:8080 \
--auth oauth \
--oauth-provider=gitea \
--oauth-client-id="${GITEA_CLIENT_ID}" \
--oauth-client-secret="${GITEA_CLIENT_SECRET}" \
--oauth-scopes="read:user" \
--disable-telemetry \
/root