diff --git a/Dockerfile b/Dockerfile index a2213e3..8a80588 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,8 @@ ARG APP_VERSION=1.0.0 WORKDIR /app -# Install curl for healthcheck -RUN apk add --no-cache curl +# Install curl for healthcheck and git for version control operations +RUN apk add --no-cache curl git # Copy package files first for layer caching COPY package*.json ./ diff --git a/README.md b/README.md index 226eb95..39624f5 100644 --- a/README.md +++ b/README.md @@ -72,17 +72,6 @@ Replace `username` with your actual Git username and `your-repo` with your repos The application will be available at: `https://your-subdomain.startanaicompany.com` -**Important: Enable Git Commit Tracking** - -To see the git commit ID in the `/health` endpoint, you must enable "Include Source Commit in Build" in your application's General settings in Coolify: - -1. Go to your application in Coolify dashboard -2. Navigate to General settings -3. Enable "Include Source Commit in Build" -4. Redeploy your application - -**Note:** This will invalidate Docker build cache on every commit (since the commit hash changes), but it allows you to track which version is deployed. - ### 5. **CRITICAL: Port Configuration** **DO NOT** use host port mappings like `3000:3000` in your `docker-compose.yml` file! @@ -265,9 +254,9 @@ saac create application \ --build-pack dockercompose ``` -**Note:** The first deployment may fail if the Coolify deploy key is not approved. To fix: +**Note:** The first deployment may fail if the deployment key is not approved. To fix: 1. Go to: `https://git.startanaicompany.com/StartAnAiCompanyTemplates/template_001/settings/keys` -2. Approve the "Coolify Wrapper Dedicated Deploy Key" +2. Approve any deployment keys that appear 3. Redeploy with: `saac deploy` ### Step 6: Monitor Deployment @@ -443,13 +432,11 @@ Health check endpoint that verifies connections to PostgreSQL and Redis, and ret ``` **Version Tracking:** -- `git_commit`: Short Git commit SHA (7 characters) of the deployed code, provided by Coolify's `SOURCE_COMMIT` environment variable (first 7 characters). Returns "unknown" if "Include Source Commit in Build" is not enabled in Coolify settings. +- `git_commit`: Short Git commit SHA (7 characters) of the deployed code, automatically detected during build - `version`: Application version (defaults to 1.0.0, can be set via APP_VERSION env var) This allows AI agents and monitoring tools to verify which version is currently running. The short commit ID is industry standard for deployment tracking, providing a balance between uniqueness and readability. -**To enable commit tracking:** Go to your application's General settings in Coolify and enable "Include Source Commit in Build", then redeploy. - --- ## Troubleshooting @@ -462,8 +449,8 @@ saac logs --follow ``` **Common issues:** -1. Coolify deploy key not approved -2. Build errors (test locally first) +1. Deploy key not approved in repository settings +2. Build errors (review application code) 3. Port configuration errors (don't use host port mappings) 4. Invalid Traefik labels