bigcapitalhq / bigcapital

💵 Bigcapital is financial accounting with intelligent reporting for faster decision-making, an open-source alternative to Quickbooks, Xero, etc.
https://bigcapital.app
GNU Affero General Public License v3.0
2.51k stars 218 forks source link

feat: one-command setup script #438

Open abouolia opened 4 months ago

abouolia commented 4 months ago
bash setup.sh
linear[bot] commented 4 months ago

BIG-166 One command to download and install self-hosted

johnnyq commented 4 months ago

nice work @abouolia it would also be a great addition to Auto setup Let Encrypt for HTTPS and install docker if not already installed

abouolia commented 4 months ago

@johnnyq great idea, will add it, will make the script ask about the domain then will generate a ssl to it.

johnnyq commented 4 months ago

Another idea @abouolia since bigcapital is multi Tenanted it would also be a nice addition to easily add tenant domains with Let Encrypt.

realadeel commented 4 months ago

lgtm

abouolia commented 4 months ago

Definitely we'll merge it 😁, that would be great thing when we do DigitalOcean one-click apps.

angelosorno commented 2 months ago

I have an idea to automate HTTPS with Certbot. Something like this.

Install Script

#!/bin/bash

# CertBot
sudo apt install snapd -y
sudo snap install core
sudo snap install --classic certbot
sudo snap refresh core
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo snap set certbot trust-plugin-with-root=ok

# Test CertBot 🤖
echo "👇 Testing CertBot functionality"
sudo certbot renew --dry-run

# Make certbot auto-configure NGINX
sudo certbot --nginx --agree-tos -v

# Rename the configuration file
sudo nginx -t

Update SSL

#!/bin/bash

sudo snap refresh core
# Test
echo "👇 Testing CertBot functionality"
sudo certbot renew --dry-run

# Check for new .conf and renew existing and new SSLs
echo "👇 Renewing certificates..."
sudo certbot renew --nginx --force-renewal -v

# Restart the service
echo "👇 Restarting Nginx..."
sudo nginx -t
sudo service nginx restart

# Check logs
echo "👇 Nginx service status..."
systemctl status nginx.service
# Display completion message
echo "👇😀"
echo "The script has completed successfully ✅"

I used this in other projects: https://github.com/angelosorno/NGINX-One/tree/main

abouolia commented 2 months ago

@angelosorno That really awesome, thanks for your contribution, fyi recently we have migrated from Nginx to Envoy proxy.

johnnyq commented 1 week ago

Hi @abouolia just checking to see if this PR will be merged soon, we can't wait to give it a shot. Thank you =]