build: Dockerfile + nginx.conf + docker-compose + Gitea CI + 404 page
Some checks failed
Deploy to web.hhivp.com / deploy (push) Failing after 3s

- Dockerfile multi-stage: node:22-alpine builds Astro → nginx:1.29-alpine
  отдаёт dist/. healthcheck wget --spider /
- nginx.conf: gzip с подходящими типами (RSS/JSON/SVG/woff2), кэш /_astro/
  immutable 1y, кэш css/js/img 30d, MIME application/rss+xml для feed,
  text/plain для robots/ai/llms/sitemap, кастомная 404
- docker-compose: контейнер anotherreflections-ru-v2 на 127.0.0.1:4084
  (старый WP на :4080 остаётся для отката)
- .gitea/workflows/deploy.yml: push в main → SSH-деплой на web,
  git fetch+reset → docker compose build → up -d → docker image prune
  (retention 7d по правилу проекта). Verify-шаг curl на :4084
- src/pages/404.astro — тематическая страница «не найдено» с навигацией
This commit is contained in:
2026-05-21 02:37:46 +03:00
parent 4319759d88
commit db0d27cf4e
5 changed files with 197 additions and 0 deletions

18
docker-compose.yml Normal file
View File

@@ -0,0 +1,18 @@
services:
anotherreflections-ru-v2:
build:
context: .
dockerfile: Dockerfile
image: anotherreflections-ru-v2:latest
container_name: anotherreflections-ru-v2
restart: unless-stopped
ports:
# На web.hhivp.com nginx-хост проксирует anotherreflections.ru
# на 127.0.0.1:4084. Менять при необходимости.
- "127.0.0.1:4084:80"
# Деплой:
# git pull в /opt/docker/sites/anotherreflections-ru-v2/
# docker compose build && docker compose up -d
# Откат — оставлен старый WP на 127.0.0.1:4080 (контейнер anotherreflections-ru),
# nginx vhost переключить обратно.