Last active
September 20, 2023 06:49
-
-
Save joshlopes/9cabfad04149758f1e479bf5d52577e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -n $PASS_SSH ]] | |
then | |
apt-get install -y ssh | |
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && (echo $PASS_SSH; echo $PASS_SSH) | passwd root | |
service ssh start | |
fi | |
if [[ -n $SSH_KEY ]] | |
then | |
apt-get install -y ssh | |
mkdir /root/.ssh | |
echo $SSH_KEY > /root/.ssh/authorized_keys | |
service ssh start | |
fi | |
ufw allow 80,443,3000,996,7946,4789,2377/tcp; ufw allow 7946,4789,2377/udp; | |
ufw --force enable | |
mkdir /root/captain | |
docker run -p 80:80 -p 443:443 -p 3000:3000 -e ACCEPTED_TERMS=true -v /var/run/docker.sock:/var/run/docker.sock -v /root/captain:/captain caprover/caprover |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment