Coolify CI/CD testing

This commit is contained in:
Ducky SSH User
2025-12-20 05:05:36 +00:00
parent 765590a1a8
commit c8548570ca
6 changed files with 644 additions and 0 deletions

59
.coolify Normal file
View File

@@ -0,0 +1,59 @@
# Nerd Monitor - Coolify Configuration
# This file documents the Coolify setup for Nerd Monitor
# Build Pack: Dockerfile (Custom)
# The project includes a Dockerfile optimized for Coolify
# Build Configuration:
# - Base Image: golang:1.23-alpine (builder), alpine:latest (runtime)
# - Build Context: . (repository root)
# - Dockerfile: ./Dockerfile
# Ports
# - Internal: 8080
# - External: 8080 (configurable in Coolify UI)
# Environment Variables (set in Coolify):
# ADDR=0.0.0.0
# PORT=8080
# USERNAME=admin (change in production)
# PASSWORD=admin (change in production)
# Health Check: Enabled
# - Endpoint: http://localhost:8080/login
# - Interval: 30s
# - Timeout: 3s
# - Retries: 3
# - Start Period: 5s
# Auto-Deploy on Push:
# 1. Connect repository to Coolify (Gitea)
# 2. Set branch to: master
# 3. Enable auto-deploy on push
# 4. Coolify will automatically build on every push to master
# Build Optimization:
# - Multi-stage build reduces final image size
# - Alpine-based for minimal footprint (~40MB final image)
# - Non-root user for security
# - Strip binaries (-w -s flags) to reduce size
# CI/CD Pipeline Flow:
# Push to master → Gitea webhook → Coolify detects
# → Coolify builds Dockerfile → New image created
# → Coolify deploys container → Service available
# Related Files:
# - Dockerfile: Server container definition
# - Dockerfile.agent: Agent container definition
# - docker-compose.yml: Local development setup
# - .dockerignore: Files excluded from Docker build context
# For local testing before pushing:
# docker-compose up -d
# For production deployment via Coolify:
# 1. Set USERNAME and PASSWORD in Coolify environment variables
# 2. Configure domain/SSL if needed
# 3. Set resource limits (CPU, Memory)
# 4. Configure auto-scaling if needed