-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (69 loc) · 2.43 KB
/
Copy pathMakefile
File metadata and controls
82 lines (69 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.PHONY: install start docker-build docker-run push logos deploy send-template
# Dependencies installation
install:
bundle install
# Development server start
start:
bundle exec ruby app.rb
# Quick development start without manual dependencies installation
dev: install start
# Docker image build
docker-build:
docker build -t rbbr-landing .
# Docker container run
docker-run:
docker run -p 4567:4567 rbbr-landing
# Complete cycle: build and run Docker
docker: docker-build docker-run
# Server availability check
check:
@echo "Checking server availability..."
@curl -s http://localhost:4567 > /dev/null && echo "Server is running!" || echo "Server is not running!"
# Push to Git repository
push:
@echo "Pushing to git repository..."
git add .
git commit -m "Update landing page" || true
git push
# Download service logos
logos:
@echo "Downloading high-quality logos from service URLs..."
bundle exec rake services:process_logos
# Deploy to production using webhook from .sitedock file
deploy:
@echo "Deploying to production..."
@webhook=$$(grep -A 1 deploy_hook .sitedock | tail -1 | tr -d ' '); \
if [ -n "$$webhook" ]; then \
echo "Triggering deploy webhook..."; \
curl -s "$$webhook"; \
echo "\nDeploy triggered successfully!"; \
else \
echo "Error: Could not find deploy webhook URL in .sitedock file"; \
exit 1; \
fi
# Send email template as JSON via webhook
send-template:
@echo "Sending email guides template via webhook..."
@if curl -s localhost:4567 > /dev/null; then \
echo "Server is running, using HTTP endpoint..."; \
curl -s "http://localhost:4567/send-yaml-via-webhook"; \
else \
echo "Server is not running, using direct method..."; \
bundle exec ruby app.rb send-yaml; \
fi
# Help
help:
@echo "Available commands:"
@echo " make install - Install dependencies"
@echo " make start - Start development server"
@echo " make dev - Install dependencies and start server"
@echo " make docker-build - Build Docker image"
@echo " make docker-run - Run Docker container"
@echo " make docker - Build and run Docker container"
@echo " make check - Check server availability"
@echo " make push - Push changes to repository"
@echo " make logos - Download high-quality logos for service cards"
@echo " make deploy - Deploy to production using webhook"
@echo " make send-template - Send email guides YAML template via webhook"
# Default - show help
default: help