You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
if [ -z $GIT_URL ]; then
export GIT_URL=github.com
echo "ENV var GIT_URL not set. Setting to: '$GIT_URL'"
fi
if [ -z $GIT_PORT ]; then
export GIT_PORT=22
echo "ENV var GIT_PORT not set. Setting to: $GIT_PORT"
fi
if [ -z $GIT_REPO ]; then
export GIT_REPO="/fermyon/bartholomew-site-template.git"
echo "ENV var GIT_REPO not set. Setting to: '$GIT_REPO'"
fi
chmod 700 /root/.ssh
chmod 700 /root/.ssh/id_ed25519
if [ ! -f /root/.ssh/id_ed25519.pub ]; then
echo "SSH key not found, generating"
ssh-keygen -t ed25519 -C "bart" -f "/root/.ssh/id_ed25519" -q -N ""
echo "Please add this key as a read-only deploy key to your git repo:"
cat /root/.ssh/id_ed25519.pub
fi
## Recreate known_hosts ONLY if host does not exist in ~/.ssh/known_hosts
ssh-keygen -F "[${GIT_URL}]:${GIT_PORT}" || echo "Generating .ssh/known_hosts" && ssh-keyscan -p $GIT_PORT $GIT_URL > ~/.ssh/known_hosts
if [ ! -d bart ]; then
git clone ssh://git@${GIT_URL}:${GIT_PORT}${GIT_REPO} bart
if [ $? != 0 ]; then
echo "Clone failed."
echo "Make sure This key has perms to pull at $GIT_URL:"
cat /root/.ssh/id_ed25519.pub
fi
fi
cd bart
git pull
spin up --listen 0.0.0.0:3000
The text was updated successfully, but these errors were encountered:
I made a docker config to automatically have my site in a container. I'd be happy to provide a PR, or you can take what I have here:
cat Dockerfile
cat docker-compose
cat init.sh
The text was updated successfully, but these errors were encountered: