mirror of
https://github.com/altstackHQ/altstack-data.git
synced 2026-04-23 17:25:14 +02:00
🤖 Sentinel: Synchronization from aa-humaaan/thealtstack
This commit is contained in:
38
docker-deploy/uptime-kuma/Dockerfile
Normal file
38
docker-deploy/uptime-kuma/Dockerfile
Normal file
@@ -0,0 +1,38 @@
|
||||
# Dockerfile for Uptime Kuma
|
||||
# Stage 1: Build
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy dependency files
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Stage 2: Runtime
|
||||
FROM node:20-alpine
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup -S uptimekuma && adduser -S uptimekuma -G uptimekuma
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy built assets and node_modules from builder
|
||||
COPY --from=builder /app ./
|
||||
|
||||
# Set permissions
|
||||
RUN chown -R uptimekuma:uptimekuma /app
|
||||
|
||||
USER uptimekuma
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
# Start Uptime Kuma
|
||||
CMD ["node", "server/server.js"]
|
||||
33
docker-deploy/uptime-kuma/docker-compose.yml
Normal file
33
docker-deploy/uptime-kuma/docker-compose.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# 🚀 BUILT & MAINTAINED BY THE ALTSTACK
|
||||
# 🌍 https://thealtstack.com
|
||||
# 💡 Open-source deployment templates for modern self-hosting.
|
||||
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
|
||||
# Docker Compose for Uptime Kuma
|
||||
|
||||
services:
|
||||
uptime-kuma:
|
||||
image: louislam/uptime-kuma:1 # Official image is standard
|
||||
container_name: uptime-kuma
|
||||
ports:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- uptime_kuma_data:/app/data
|
||||
networks:
|
||||
- uptime_net
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://localhost:3001/" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
uptime_net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
uptime_kuma_data:
|
||||
name: uptime_kuma_data
|
||||
68
docker-deploy/uptime-kuma/install.sh
Executable file
68
docker-deploy/uptime-kuma/install.sh
Executable file
@@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
# 🚀 Auto-generated by The AltStack
|
||||
# https://thealtstack.com
|
||||
|
||||
echo "🔵 Starting AltStack Deployment..."
|
||||
|
||||
# 1. Check/Install Docker
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "📦 Docker not found. Installing..."
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sh get-docker.sh
|
||||
rm get-docker.sh
|
||||
echo "✅ Docker installed."
|
||||
else
|
||||
echo "✅ Docker is already installed."
|
||||
fi
|
||||
|
||||
# 2. Setup Directory
|
||||
APP_DIR="uptime-kuma-deploy"
|
||||
mkdir -p $APP_DIR
|
||||
cd $APP_DIR
|
||||
echo "📂 Created directory: $APP_DIR"
|
||||
|
||||
# 3. Create docker-compose.yml
|
||||
echo "📄 Writing configuration..."
|
||||
cat << 'INNER_EOF' > docker-compose.yml
|
||||
# -------------------------------------------------------------------------
|
||||
# 🚀 Created and distributed by The AltStack
|
||||
# 🌍 https://thealtstack.com
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# Docker Compose for Uptime Kuma
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
uptime-kuma:
|
||||
image: louislam/uptime-kuma:1 # Official image is standard
|
||||
container_name: uptime-kuma
|
||||
ports:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- uptime_kuma_data:/app/data
|
||||
networks:
|
||||
- uptime_net
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://localhost:3001/" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
uptime_net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
uptime_kuma_data:
|
||||
name: uptime_kuma_data
|
||||
|
||||
INNER_EOF
|
||||
|
||||
# 4. Start Services
|
||||
echo "🚀 Starting services..."
|
||||
docker compose up -d
|
||||
|
||||
echo ""
|
||||
echo "✅ Deployment Complete!"
|
||||
echo "👉 Your uptime-kuma stack is running."
|
||||
Reference in New Issue
Block a user