Coolify Kurulumu: Self-Hosted PaaS ile Uygulama Deployment
Coolify kurulumu, Docker ve Git entegrasyonu, uygulama deployment, veritabanı yönetimi, SSL sertifikaları, environment variables ve Heroku/Netlify alternatifi self-hosted PaaS.
Ghost Docker kurulumu, Nginx reverse proxy, SSL sertifikası, tema kurulumu, üyelik ve abonelik sistemi, email newsletter ve production yapılandırması.
Ghost, modern blog ve içerik yayıncılığı için tasarlanmış açık kaynaklı bir CMS platformudur. WordPress'e kıyasla daha hızlı, daha güvenli ve içerik odaklı bir yapıya sahiptir. Üyelik sistemi, newsletter ve ödeme entegrasyonu ile içerik monetizasyonu da destekler.
Ghost, Node.js tabanlı headless CMS ve yayıncılık platformudur. Öne çıkan özellikleri:
# docker-compose.yml
version: '3.8'
services:
ghost:
image: ghost:5-alpine
container_name: ghost
restart: unless-stopped
depends_on:
- db
environment:
database__client: mysql
database__connection__host: db
database__connection__user: ghost
database__connection__password: guclu-sifre
database__connection__database: ghost
url: https://blog.example.com
mail__transport: SMTP
mail__options__host: smtp.mailgun.org
mail__options__port: 587
mail__options__auth__user: postmaster@mg.example.com
mail__options__auth__pass: mailgun-api-key
mail__from: noreply@example.com
volumes:
- ./ghost-content:/var/lib/ghost/content
ports:
- "127.0.0.1:2368:2368"
db:
image: mysql:8.0
container_name: ghost-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root-sifre
MYSQL_DATABASE: ghost
MYSQL_USER: ghost
MYSQL_PASSWORD: guclu-sifre
volumes:
- mysql-data:/var/lib/mysql
volumes:
mysql-data:
# Container'ları başlat
docker compose up -d
# Logları kontrol et
docker logs ghost -f
Ghost ilk başlatmada veritabanını otomatik oluşturur. https://blog.example.com/ghost adresinden admin paneline erişebilirsiniz.
services:
ghost:
image: ghost:5-alpine
container_name: ghost
restart: unless-stopped
environment:
url: https://blog.example.com
NODE_ENV: production
volumes:
- ./ghost-content:/var/lib/ghost/content
ports:
- "127.0.0.1:2368:2368"
server {
listen 80;
server_name blog.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name blog.example.com;
ssl_certificate /etc/letsencrypt/live/blog.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/blog.example.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
# Güvenlik başlıkları
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header Referrer-Policy no-referrer-when-downgrade;
location / {
proxy_pass http://127.0.0.1:2368;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
}
# SSL sertifikası al
certbot --nginx -d blog.example.com
https://blog.example.com/ghost adresine gidin:
Settings → General
- Site title: Blog Adı
- Site description: Kısa açıklama
- Site timezone: Europe/Istanbul
- Publication language: tr
- Meta title/description: SEO için
# Casper (varsayılan tema)
# Zaten yüklü gelir
# Özel tema yükleme
# Settings → Design → Upload theme
# .zip formatında tema dosyası yükleyin
{{! default.hbs - Ana şablon }}
<!DOCTYPE html>
<html lang="{{@site.locale}}">
<head>
<meta charset="utf-8">
<title>{{meta_title}}</title>
{{ghost_head}}
</head>
<body class="{{body_class}}">
{{> header}}
{{{body}}}
{{> footer}}
{{ghost_foot}}
</body>
</html>
Settings → Membership
- Allow free members: Etkin
- Paid subscriptions: Stripe ile
- Default post access: Public / Members only / Paid
Settings → Membership → Stripe
1. Stripe hesabı oluşturun
2. API anahtarlarını girin:
- Publishable key: pk_live_...
- Secret key: sk_live_...
3. Webhook endpoint ekleyin:
https://blog.example.com/members/webhooks/stripe
Bu bölüm herkese açık.
<!--members-only-->
Bu bölüm sadece üyelere görünür.
<!--paid-members-only-->
Bu bölüm sadece ücretli üyelere görünür.
environment:
mail__transport: SMTP
mail__options__service: Mailgun
mail__options__host: smtp.mailgun.org
mail__options__port: 587
mail__options__auth__user: postmaster@mg.example.com
mail__options__auth__pass: mailgun-smtp-password
mail__from: "Blog Adı <noreply@example.com>"
Yeni yazı oluştururken:
- Email newsletter: Etkin
- Send to: All members / Free members / Paid members
- Subject: E-posta konusu
- Preview text: Önizleme metni
# Ghost container içinde CLI kullanımı
docker exec -it ghost ghost
# Kullanıcı listesi
docker exec ghost ghost ls
# Ghost'u yeniden başlat
docker exec ghost ghost restart
# Log görüntüle
docker exec ghost ghost log
# Ghost içerik dizinini yedekle
tar -czf ghost-backup-$(date +%Y%m%d).tar.gz ./ghost-content/
# MySQL veritabanı yedeği
docker exec ghost-db mysqldump -u ghost -pguclu-sifre ghost > \
ghost-db-$(date +%Y%m%d).sql
# Otomatik yedekleme scripti
cat > /etc/cron.daily/ghost-backup << 'EOF'
#!/bin/bash
BACKUP_DIR="/backups/ghost"
mkdir -p $BACKUP_DIR
tar -czf $BACKUP_DIR/content-$(date +%Y%m%d).tar.gz /opt/ghost/ghost-content/
docker exec ghost-db mysqldump -u ghost -pguclu-sifre ghost | \
gzip > $BACKUP_DIR/db-$(date +%Y%m%d).sql.gz
find $BACKUP_DIR -name "*.gz" -mtime +30 -delete
EOF
chmod +x /etc/cron.daily/ghost-backup
REXE VPS sunucularında Ghost ile profesyonel blog ve içerik platformu kurabilirsiniz. 2 GB RAM ile binlerce okuyucuya hizmet verebilirsiniz.
Ghost container'ının çalıştığını docker ps ile kontrol edin. URL ortam değişkeninin doğru ayarlandığından emin olun (https://blog.example.com). Nginx proxy yapılandırmasını kontrol edin. Ghost loglarını inceleyin: docker logs ghost. İlk kurulumda /ghost yoluna gidin: https://blog.example.com/ghost.
SMTP ayarlarını kontrol edin. Mailgun kullanıyorsanız domain'in doğrulandığından emin olun. Ghost admin panelinden Settings → Email → Test email gönderin. Mailgun sandbox modunda sadece doğrulanmış adreslere gönderim yapılabilir. Production için Mailgun domain'ini aktive edin.
Stripe API anahtarlarının doğru girildiğini kontrol edin (live key, test key değil). Webhook endpoint'inin Stripe dashboard'unda eklendiğini doğrulayın. Ghost URL'sinin HTTPS olduğundan emin olun (Stripe HTTP'yi reddeder). Stripe loglarından webhook olaylarını kontrol edin.
Güncelleme öncesi yedek alın (içerik dizini + veritabanı). docker compose pull ile yeni imajı indirin. docker compose up -d ile container'ı yeniden başlatın. Ghost otomatik veritabanı migration yapar. Büyük sürüm güncellemelerinde (örn: 4.x → 5.x) release notlarını okuyun ve test ortamında deneyin.
Tema .zip dosyasının doğru yapıda olduğundan emin olun (package.json ve index.hbs zorunlu). Settings → Design → Activate ile temayı aktive edin. Ghost loglarında tema hatalarını kontrol edin. Tema Ghost versiyonuyla uyumlu olmalıdır (gscan ile kontrol edebilirsiniz).
MySQL kullanıyorsanız veritabanı bağlantısını optimize edin. Nginx'te gzip sıkıştırma ve browser caching ekleyin. Ghost'ta Settings → Labs → Enable caching seçeneğini aktive edin. CDN kullanmayı düşünün (Cloudflare ücretsiz plan). Sunucu RAM'ini artırın (minimum 2 GB önerilir).
Coolify kurulumu, Docker ve Git entegrasyonu, uygulama deployment, veritabanı yönetimi, SSL sertifikaları, environment variables ve Heroku/Netlify alternatifi self-hosted PaaS.
Nextcloud kurulumu Docker ile, Apache/Nginx yapılandırması, veritabanı kurulumu, SSL sertifikası, dosya senkronizasyonu, uygulama mağazası ve performans optimizasyonu.
Portainer CE kurulumu, Docker ve Kubernetes yönetimi, stack deployment, volume/network yönetimi, kullanıcı yetkilendirme, webhook ve GitOps entegrasyonu.