mirror of
https://github.com/caprover/caprover
synced 2025-12-10 13:25:39 +00:00
109 lines
2.1 KiB
Plaintext
109 lines
2.1 KiB
Plaintext
# Copy and paste the script below to build a One-Click App in DO
|
|
# https://github.com/digitalocean/marketplace-partners/blob/master/marketplace_docs/build-an-image.md#cleaning-up-your-build-droplet
|
|
|
|
|
|
apt -y update && apt -y full-upgrade && apt autoclean -y && apt autoremove -y
|
|
|
|
|
|
|
|
############################ WAIT
|
|
|
|
|
|
docker pull caprover/caprover:1.10.0
|
|
|
|
|
|
cd /var/lib/cloud/scripts/per-instance
|
|
|
|
touch z_01_caprover_installation.sh
|
|
rm -f z_01_caprover_installation.sh
|
|
touch z_01_caprover_installation.sh
|
|
|
|
cat <<EOT >> z_01_caprover_installation.sh
|
|
#!/bin/sh
|
|
|
|
ufw allow 80,443,3000,996,7946,4789,2377/tcp; ufw allow 7946,4789,2377/udp;
|
|
|
|
docker run -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover:1.10.0
|
|
|
|
|
|
EOT
|
|
|
|
|
|
chmod +x z_01_caprover_installation.sh
|
|
|
|
|
|
cd /etc/update-motd.d/
|
|
rm -f 99*
|
|
touch 99-caprover-readme
|
|
|
|
|
|
cat <<EOT >> 99-caprover-readme
|
|
#!/bin/sh
|
|
#
|
|
# Configured as part of the DigitalOcean 1-Click Image build process
|
|
|
|
cat <<EOF
|
|
********************************************************************************
|
|
|
|
Welcome to CapRover, Open Source PaaS for developers!
|
|
|
|
|
|
Follow the guide here to finish the setup https://caprover.com/docs/get-started.html#step-3-install-caprover-cli
|
|
|
|
Or you can access the dashboard from http://<IP-ADDRESS>:3000
|
|
|
|
The default password is captain42
|
|
|
|
|
|
|
|
|
|
Please make sure to read the documentation https://CapRover.com
|
|
|
|
|
|
********************************************************************************
|
|
|
|
EOF
|
|
|
|
|
|
EOT
|
|
|
|
|
|
chmod +x 99-caprover-readme
|
|
|
|
|
|
|
|
############################ WAIT
|
|
|
|
|
|
|
|
apt -y update && apt -y full-upgrade
|
|
|
|
|
|
cd /etc
|
|
wget https://raw.githubusercontent.com/digitalocean/marketplace-partners/master/scripts/99-img-check.sh
|
|
chmod +x 99-img-check.sh
|
|
./99-img-check.sh
|
|
|
|
|
|
############################ WAIT
|
|
|
|
|
|
|
|
cd /etc
|
|
wget https://raw.githubusercontent.com/digitalocean/marketplace-partners/master/scripts/90-cleanup.sh
|
|
chmod +x 90-cleanup.sh
|
|
./90-cleanup.sh
|
|
|
|
|
|
|
|
cat /var/lib/cloud/scripts/per-instance/z_01_caprover_installation.sh
|
|
cat /etc/update-motd.d/99-caprover-readme
|
|
history -c
|
|
cat /dev/null > /root/.bash_history
|
|
|
|
|
|
|
|
|
|
|
|
|