mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-11 19:56:44 +00:00
feat: Add installation script and update README for simplified setup
This commit is contained in:
parent
6564fe2ae6
commit
e7d13f9e7c
4 changed files with 78 additions and 5 deletions
|
|
@ -130,6 +130,12 @@ const HomeFeatureSet: FeatureSet = {
|
|||
},
|
||||
);
|
||||
|
||||
app.get("/install.sh", (_req: ExpressRequest, res: ExpressResponse) => {
|
||||
res.redirect(
|
||||
"https://raw.githubusercontent.com/OneUptime/oneuptime/release/Home/Scripts/Install.sh",
|
||||
);
|
||||
});
|
||||
|
||||
app.get("/support", async (_req: ExpressRequest, res: ExpressResponse) => {
|
||||
const seo: PageSEOData & { fullCanonicalUrl: string } = getSEOForPath(
|
||||
"/support",
|
||||
|
|
|
|||
69
Home/Scripts/Install.sh
Normal file
69
Home/Scripts/Install.sh
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo -e "${BLUE}"
|
||||
echo " ___ _ _ _ _ "
|
||||
echo " / _ \ _ __ ___ | | | |_ __ | |_(_)_ __ ___ ___ "
|
||||
echo "| | | | '_ \ / _ \| | | | '_ \| __| | '_ \` _ \ / _ \\"
|
||||
echo "| |_| | | | | __/| |_| | |_) | |_| | | | | | | __/"
|
||||
echo " \___/|_| |_|\___| \___/| .__/ \__|_|_| |_| |_|\___|"
|
||||
echo " |_| "
|
||||
echo -e "${NC}"
|
||||
echo -e "${GREEN}OneUptime Installation Script${NC}"
|
||||
echo ""
|
||||
|
||||
# Check for required dependencies
|
||||
echo -e "${YELLOW}Checking dependencies...${NC}"
|
||||
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo -e "${RED}Error: git is not installed. Please install git first.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v npm &> /dev/null; then
|
||||
echo -e "${RED}Error: npm is not installed. Please install Node.js and npm first.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo -e "${RED}Error: docker is not installed. Please install Docker first.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}All dependencies are installed.${NC}"
|
||||
echo ""
|
||||
|
||||
# Clone the repository
|
||||
echo -e "${YELLOW}Cloning OneUptime repository...${NC}"
|
||||
|
||||
if [ -d "oneuptime" ]; then
|
||||
echo -e "${YELLOW}Directory 'oneuptime' already exists. Pulling latest changes...${NC}"
|
||||
cd oneuptime
|
||||
git pull
|
||||
else
|
||||
git clone https://github.com/OneUptime/oneuptime.git
|
||||
cd oneuptime
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo -e "${GREEN}Repository cloned successfully.${NC}"
|
||||
echo ""
|
||||
|
||||
# Start OneUptime
|
||||
echo -e "${YELLOW}Starting OneUptime...${NC}"
|
||||
echo ""
|
||||
|
||||
npm run start
|
||||
|
||||
echo ""
|
||||
echo -e "${GREEN}OneUptime is now running!${NC}"
|
||||
echo -e "${BLUE}Access the dashboard at: http://localhost${NC}"
|
||||
echo ""
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
<div class="px-6 py-5">
|
||||
<code class="text-slate-300 font-mono text-sm sm:text-base">
|
||||
<span class="text-slate-500">$</span> docker compose up -d
|
||||
<span class="text-slate-500">$</span> curl <%= locals.homeUrl || 'https://oneuptime.com' %>/install.sh | bash
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -125,10 +125,8 @@ By using OneUptime Cloud, you also support the continued development of the open
|
|||
## 🛠️ Installation
|
||||
|
||||
```bash
|
||||
# Quick start with Docker Compose
|
||||
git clone https://github.com/OneUptime/oneuptime.git
|
||||
cd oneuptime
|
||||
npm run start
|
||||
# Quick start with one command
|
||||
curl https://oneuptime.com/install.sh | bash
|
||||
```
|
||||
|
||||
For detailed installation guides, see:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue