diff --git a/CI_CD_PIPELINE_SETUP_GUIDE.md b/CI_CD_PIPELINE_SETUP_GUIDE.md index b3bb576..d5400cd 100644 --- a/CI_CD_PIPELINE_SETUP_GUIDE.md +++ b/CI_CD_PIPELINE_SETUP_GUIDE.md @@ -440,6 +440,9 @@ sudo chown SERVICE_USER:SERVICE_USER /opt/registry #### 4.2 Create Registry Configuration ```bash +# Switch to SERVICE_USER (registry directory owner) +sudo su - SERVICE_USER + cat > /opt/registry/config.yml << 'EOF' version: 0.1 log: @@ -468,6 +471,9 @@ health: interval: 10s threshold: 3 EOF + +# Exit SERVICE_USER shell +exit ``` **What this configuration does:** @@ -476,6 +482,8 @@ EOF - **Security Headers**: Protects against common web vulnerabilities - **No Secret Key**: The `secret` field was unnecessary and has been removed +**Security Note**: We switch to SERVICE_USER because the registry directory is owned by SERVICE_USER, maintaining proper file ownership and security. + #### 4.3 Create Authentication File ```bash @@ -499,8 +507,6 @@ exit **Note**: Pull operations are public and don't require authentication, but push operations require these credentials. -**Security Note**: We switch to SERVICE_USER because the registry directory is owned by SERVICE_USER, maintaining proper file ownership and security. - #### 4.4 Create Docker Compose for Registry ```bash