91cb337c03
- Multi-stage Dockerfile on node:24-slim, non-root, healthcheck, /app/data volume - server.mjs wraps the Astro handler with brotli/gzip compression, security headers and graceful SIGTERM shutdown (npm start) - GET /api/health/ reports server and view-counter DB status - Move build-only packages to devDependencies (smaller runtime image) - docker-compose.yml as an alternative for Dokploy Compose Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.7 KiB
Markdown
32 lines
1.7 KiB
Markdown
# ta1sph.info
|
||
|
||
Suphi Çakır (TA1SPH) — amatör telsizcilik blog & portfolyo sitesi.
|
||
|
||
- **Stack:** Astro 7 · TailwindCSS 4 · TypeScript (strict)
|
||
- **Çıktı:** statik site + `@astrojs/node` (yalnızca görüntülenme sayacı API'si dinamik)
|
||
- **Yayın:** Docker → Dokploy (HomeServer Atlas) → https://ta1sph.info
|
||
|
||
## Komutlar
|
||
|
||
| Komut | Açıklama |
|
||
| :----------------------------- | :--------------------------------------------------- |
|
||
| `npm install` | Bağımlılıkları kurar |
|
||
| `npm run dev` | Geliştirme sunucusu (`localhost:4321`) |
|
||
| `npm run check` | `astro check` (tip ve şablon kontrolü) |
|
||
| `npm run build` | Üretim derlemesi + Pagefind arama indeksi |
|
||
| `npm run preview` | Derlenmiş siteyi yerelde çalıştırır |
|
||
| `npm run format` | Prettier ile biçimlendirir |
|
||
| `npm run new:post -- "Başlık"` | `src/content/blog/<slug>/index.md` taslağı oluşturur |
|
||
|
||
## Yayın (Docker · Dokploy)
|
||
|
||
- `Dockerfile` (Node 24 LTS, çok aşamalı) → konteyner `node server.mjs`, port **4321**, kullanıcı `node`.
|
||
- Kalıcı veri: görüntülenme sayacı `/app/data/views.db` → Dokploy'da **Volume Mount** `/app/data`.
|
||
- Sağlık kontrolü: `GET /api/health/` (`{"status":"ok","db":true}`).
|
||
- Ortam değişkenleri: `HOST` (0.0.0.0), `PORT` (4321), `DATA_DIR` (/app/data) — imajda varsayılan.
|
||
- `docker-compose.yml`: Dokploy "Compose" türü için alternatif.
|
||
|
||
## Lisans
|
||
|
||
Kod [MIT](LICENSE), içerik [CC BY-SA 4.0](LICENSE-CONTENT).
|