diff --git a/CI_CD_PIPELINE_SETUP_GUIDE.md b/CI_CD_PIPELINE_SETUP_GUIDE.md index e30362c..600d30f 100644 --- a/CI_CD_PIPELINE_SETUP_GUIDE.md +++ b/CI_CD_PIPELINE_SETUP_GUIDE.md @@ -65,10 +65,10 @@ This guide covers setting up a complete Continuous Integration/Continuous Deploy ### CI/CD Linode Features - Forgejo Actions runner for automated builds - **Docker-in-Docker (DinD) container** for isolated CI operations -- Docker Registry with Caddy reverse proxy for image storage +- Docker Registry with nginx reverse proxy for image storage - **FHS-compliant directory structure** for data, certificates, and logs - Unauthenticated pulls, authenticated pushes -- Automatic HTTPS with Caddy +- Automatic HTTPS with nginx - Secure SSH communication with production - **Simplified cleanup** - just restart DinD container @@ -654,9 +654,9 @@ sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo usermod -aG docker CI_SERVICE_USER ``` -### Step 5: Set Up Docker Registry with Caddy +### Step 5: Set Up Docker Registry with nginx -We'll set up a basic Docker Registry with Caddy as a reverse proxy, configured to allow unauthenticated pulls but require authentication for pushes. +We'll set up a basic Docker Registry with nginx as a reverse proxy, configured to allow unauthenticated pulls but require authentication for pushes. #### 5.1 Configure FHS-Compliant Registry Directories @@ -679,38 +679,34 @@ sudo chmod 755 /var/log/registry # Navigate to the cloned application directory cd /opt/APP_NAME/registry -# Update Caddyfile with your actual IP address -sudo sed -i "s/YOUR_CI_CD_IP/YOUR_ACTUAL_IP_ADDRESS/g" /opt/APP_NAME/registry/Caddyfile +# Update nginx.conf with your actual IP address +sudo sed -i "s/YOUR_CI_CD_IP/YOUR_ACTUAL_IP_ADDRESS/g" /opt/APP_NAME/registry/nginx.conf # Update openssl.conf with your actual IP address and registry name sudo sed -i "s/YOUR_CI_CD_IP/YOUR_ACTUAL_IP_ADDRESS/g" /opt/APP_NAME/registry/openssl.conf sudo sed -i "s/YOUR_REGISTRY_NAME/APP_NAME-Registry/g" /opt/APP_NAME/registry/openssl.conf -# Create FHS-compliant environment directory -sudo mkdir -p /etc/registry/env -sudo chown CI_SERVICE_USER:CI_SERVICE_USER /etc/registry/env -sudo chmod 755 /etc/registry/env +# Create FHS-compliant authentication directory +sudo mkdir -p /etc/registry/auth +sudo chown CI_SERVICE_USER:CI_SERVICE_USER /etc/registry/auth +sudo chmod 755 /etc/registry/auth -# Create secure environment file for registry authentication -# First, create a secure password hash +# Create htpasswd file for nginx authentication # Save this password somewhere safe REGISTRY_PASSWORD="your-secure-registry-password" -REGISTRY_PASSWORD_HASH=$(htpasswd -nbB registry-user "$REGISTRY_PASSWORD" | cut -d: -f2) -# Create the .env file in FHS-compliant location -sudo tee /etc/registry/env/.env > /dev/null <