Skip to content

Commit 0eb0e5f

Browse files
committed
build:redis removed from teh pipeline
1 parent 5738833 commit 0eb0e5f

File tree

3 files changed

+3
-149
lines changed

3 files changed

+3
-149
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,7 @@ jobs:
3131
--health-retries=3
3232
ports:
3333
- 3306:3306
34-
35-
redis:
36-
image: redis
37-
options: >-
38-
--health-cmd "redis-cli ping"
39-
--health-interval 10s
40-
--health-timeout 5s
41-
--health-retries 5
42-
ports:
43-
- 6379:6379
44-
34+
4535
steps:
4636
- name: Checkout code
4737
uses: actions/checkout@v4
@@ -71,11 +61,6 @@ jobs:
7161
echo "DB_DATABASE=laravel_test" >> .env
7262
echo "DB_USERNAME=root" >> .env
7363
echo "DB_PASSWORD=password" >> .env
74-
echo "CACHE_DRIVER=redis" >> .env
75-
echo "SESSION_DRIVER=redis" >> .env
76-
echo "QUEUE_CONNECTION=sync" >> .env
77-
echo "REDIS_HOST=127.0.0.1" >> .env
78-
echo "REDIS_PORT=6379" >> .env
7964
php artisan config:clear
8065
cat .env
8166
@@ -86,13 +71,7 @@ jobs:
8671
sleep 2
8772
done
8873
echo "MySQL is ready!"
89-
90-
echo "Waiting for Redis..."
91-
while ! redis-cli -h 127.0.0.1 -p 6379 ping; do
92-
sleep 2
93-
done
94-
echo "Redis is ready!"
95-
74+
9675
- name: Run tests
9776
run: |
9877
php artisan migrate --force

DEPLOYMENT_GUIDE.md

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
# Laravel Blog AWS Deployment Guide
22

3-
This guide will help you deploy your Laravel blog application to AWS using GitHub Actions CI/CD pipeline.
4-
5-
## 🏗️ Architecture Overview
6-
7-
- **AWS ECS Fargate**: Container orchestration for running the Laravel application
8-
- **AWS RDS MySQL**: Managed database service
9-
- **AWS ElastiCache Redis**: Caching and session storage
10-
- **AWS S3**: File storage (already configured)
11-
- **Application Load Balancer**: Traffic distribution and SSL termination
12-
- **AWS ECR**: Container registry for Docker images
13-
- **GitHub Actions**: CI/CD pipeline
14-
15-
## 📋 Prerequisites
16-
17-
1. AWS Account with appropriate permissions
18-
2. GitHub repository with your Laravel application
19-
3. Domain name (optional, but recommended)
20-
4. AWS CLI installed locally
213

224
## 🚀 Step-by-Step Deployment
235

@@ -239,71 +221,6 @@ View application logs:
239221
aws logs tail /ecs/laravel-blog --follow
240222
```
241223

242-
### Health Checks
243-
- Application Load Balancer performs health checks on `/`
244-
- ECS tasks have health checks configured
245-
- CloudWatch alarms can be set up for monitoring
246-
247-
## 💰 Cost Optimization
248-
249-
### Estimated Monthly Costs (us-east-1):
250-
- **ECS Fargate (0.5 vCPU, 1GB)**: ~$15
251-
- **RDS MySQL (db.t3.micro)**: ~$15
252-
- **ElastiCache Redis (cache.t3.micro)**: ~$15
253-
- **Application Load Balancer**: ~$20
254-
- **Data Transfer**: Variable
255-
- **Total**: ~$65-80/month
256-
257-
### Cost Optimization Tips:
258-
1. Use Spot instances for non-production
259-
2. Schedule stop/start for development environments
260-
3. Use Reserved Instances for production workloads
261-
4. Implement auto-scaling based on CPU/memory usage
262-
263-
## 🔒 Security Best Practices
264-
265-
1. **Secrets Management**: Use AWS Systems Manager Parameter Store
266-
2. **Network Security**: Private subnets for database and cache
267-
3. **IAM Roles**: Least privilege access
268-
4. **SSL/TLS**: Use ACM certificates
269-
5. **Security Groups**: Restrict access to necessary ports only
270-
6. **Image Scanning**: ECR automatically scans images for vulnerabilities
271-
272-
## 🔄 Alternative Deployment Options
273-
274-
### 1. AWS App Runner (Simpler, Higher Cost)
275-
- Easier to set up and manage
276-
- Automatic scaling and load balancing
277-
- Higher cost (~$100-150/month)
278-
279-
### 2. AWS Elastic Beanstalk
280-
- Platform-as-a-Service approach
281-
- Good for traditional applications
282-
- Less container-native
283-
284-
### 3. AWS Lambda + API Gateway (Serverless)
285-
- Pay per request
286-
- Complex for full Laravel applications
287-
- Good for APIs only
288-
289-
## 🚨 Troubleshooting
290-
291-
### Common Issues:
292-
293-
1. **ECS Task Fails to Start**
294-
- Check CloudWatch logs
295-
- Verify environment variables
296-
- Check IAM permissions
297-
298-
2. **Database Connection Issues**
299-
- Verify security groups
300-
- Check RDS endpoint
301-
- Validate credentials
302-
303-
3. **File Upload Issues**
304-
- Verify S3 bucket permissions
305-
- Check IAM role for ECS tasks
306-
307224
### Useful Commands:
308225

309226
```bash
@@ -319,13 +236,3 @@ aws elbv2 describe-target-health --target-group-arn YOUR_TARGET_GROUP_ARN
319236
# View CloudFormation stack status
320237
aws cloudformation describe-stacks --stack-name laravel-blog-infrastructure
321238
```
322-
323-
## 📞 Support
324-
325-
For issues with this deployment:
326-
1. Check CloudWatch logs first
327-
2. Verify all AWS resources are properly configured
328-
3. Ensure GitHub secrets are correctly set
329-
4. Review the task definition for correct values
330-
331-
This deployment provides a production-ready, scalable, and secure environment for your Laravel blog application on AWS.

DEPLOYMENT_NO_DOMAIN.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Deploy Laravel Blog on AWS (No Domain Required)
1+
# Deploy Laravel Blog on AWS without a domain
22

33
Yes, you can absolutely deploy your Laravel blog on AWS **without owning a domain**! AWS will provide you with a URL to access your application.
44

@@ -159,29 +159,6 @@ git commit -m "Deploy to AWS"
159159
git push origin main
160160
```
161161

162-
## 🔄 Adding a Domain Later (Optional)
163-
164-
If you get a domain later, you can easily add it:
165-
166-
1. **Purchase a domain** (Route 53, GoDaddy, etc.)
167-
2. **Create ACM certificate** for HTTPS
168-
3. **Update ALB listener** to use HTTPS
169-
4. **Point domain** to your ALB
170-
5. **Update APP_URL** in task definition
171-
172-
## 💰 Cost (Without Domain)
173-
174-
**Monthly AWS costs (us-east-1):**
175-
- ECS Fargate: ~$15
176-
- RDS MySQL: ~$15
177-
- ElastiCache Redis: ~$15
178-
- Application Load Balancer: ~$20
179-
- **Total: ~$65/month**
180-
181-
**No additional costs for:**
182-
- Domain registration
183-
- SSL certificates (for now)
184-
- DNS hosting
185162

186163
## 🚀 Live Example
187164

@@ -202,12 +179,3 @@ Password: password
202179
http://laravel-blog-alb-1234567890.us-east-1.elb.amazonaws.com/blog
203180
```
204181

205-
## ✨ Ready to Deploy?
206-
207-
You can start deploying right now! The AWS-provided URL works perfectly for:
208-
- ✅ Testing your application
209-
- ✅ Sharing with friends/clients
210-
- ✅ Development and staging
211-
- ✅ Production use (if you don't mind the long URL)
212-
213-
Your Laravel blog will be **fully functional and professional** even without a custom domain!

0 commit comments

Comments
 (0)