Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/build-scan-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,28 @@ jobs:
echo "id=$IMAGE_ID" >> "$GITHUB_OUTPUT"

# Smoke deploy the container and require exit 0
- name: Smoke run (must exit 0)
- name: Smoke test Flask container
run: |
set -euo pipefail
docker run --rm "${{ steps.imgref.outputs.image_ref }}" ${{ env.SMOKE_TEST_CMD }}

echo "Starting container in detached mode..."
CONTAINER_ID=$(docker run -d -p 8888:8888 "${{ steps.imgref.outputs.image_ref }}")

echo "Waiting for container to start..."
for i in {1..10}; do
if curl -sSf http://localhost:8888/health > /dev/null; then
echo "Health endpoint is responding!"
break
fi
echo "Attempt $i: Waiting for app to become healthy..."
sleep 2
done

# Final check: Fail if /health never came up
curl -sSf http://localhost:8888/health

echo "Stopping container..."
docker stop "$CONTAINER_ID"

# --- Rebuild for push (or just push the already-built image) ---
# We push using buildx for reproducibility and to attach labels/metadata.
Expand Down
4 changes: 4 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
def home():
return render_template('index.html')

@app.route('/health')
def health():
return "OK", 200

if __name__ == '__main__':
app.run(host='0.0.0.0', port=8888, debug=True)
65 changes: 64 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,77 @@
.highlight {
color: #007acc;
font-weight: bold;
text-decoration: none;
}
.highlight:hover {
text-decoration: underline;
}
h2 {
color: #333;
margin-top: 30px;
margin-bottom: 15px;
font-size: 20px;
border-left: 4px solid #007acc;
padding-left: 15px;
}
ul {
text-align: left;
margin: 15px 0;
padding-left: 20px;
}
li {
margin-bottom: 8px;
line-height: 1.5;
}
a {
color: #007acc;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<h1>Built with Augment Code by Scott Ford</h1>
<div class="main-content">
<p>This simple Python application was created using <span class="highlight">augment code</span> to demonstrate the power of building applications using natural language.</p>
<p>This comprehensive Flask web application was created entirely using <span class="highlight">Augment Code</span> to demonstrate the power of AI-assisted development through natural language programming.</p>

<h2>What Was Generated</h2>
<p>Every component of this project was built using conversational instructions with Augment Code:</p>
<ul>
<li><strong>Flask Web Application:</strong> Complete Python backend with routing and template rendering</li>
<li><strong>Responsive HTML Template:</strong> Professional styling with modern CSS and responsive design</li>
<li><strong>Docker Configuration:</strong> Multi-stage Dockerfile with optimized caching and Python 3.11 slim base</li>
<li><strong>Docker Compose Setup:</strong> Development environment with volume mounting and environment variables</li>
<li><strong>GitHub Actions CI/CD:</strong> Complete build → smoke test → push pipeline to GitHub Container Registry</li>
<li><strong>Comprehensive Documentation:</strong> Detailed README with multiple deployment options and project structure</li>
<li><strong>Production-Ready Configuration:</strong> Security best practices, proper permissions, and modern tooling</li>
</ul>

<h2>Technical Highlights</h2>
<p>The project showcases modern development practices:</p>
<ul>
<li>🐍 <strong>Python 3.11</strong> with Flask 2.3.3 framework</li>
<li>🐳 <strong>Docker containerization</strong> with optimized builds and Buildx support</li>
<li>🚀 <strong>GitHub Container Registry</strong> integration with smart tagging strategies</li>
<li>🔄 <strong>Automated CI/CD</strong> with pull request validation and smoke testing</li>
<li>📱 <strong>Responsive design</strong> with clean, professional styling</li>
<li>🛡️ <strong>Security-first approach</strong> with proper permissions and modern action versions</li>
</ul>

<h2>From Concept to Production</h2>
<p>This entire application stack was built through natural language conversations, demonstrating how developers can rapidly prototype and deploy production-ready applications without writing boilerplate code. The AI assistant handled everything from initial Flask setup to complex GitHub Actions workflows.</p>

<h2>Learn More About Augment Code</h2>
<p>Ready to experience the future of development? Get started with Augment Code and transform how you build software:</p>
<ul>
<li>📺 <strong>Watch tutorials:</strong> <a href="https://www.youtube.com/@augmentcode" target="_blank" class="highlight">Augment Code YouTube Channel</a></li>
<li>📖 <strong>Read the docs:</strong> <a href="https://docs.augmentcode.com" target="_blank" class="highlight">Official Documentation</a></li>
<li>🌐 <strong>Visit the website:</strong> <a href="https://augmentcode.com" target="_blank" class="highlight">augmentcode.com</a></li>
</ul>
<p>Join thousands of developers who are already building faster, smarter, and more efficiently with AI-powered development tools.</p>
</div>
</div>
</body>
Expand Down