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 — тематическая страница «не найдено» с навигацией
24 lines
774 B
Docker
24 lines
774 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# ─── Stage 1: build static site (Astro SSG) ────────────────────────────────
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# ─── Stage 2: nginx runtime ─────────────────────────────────────────────────
|
|
FROM nginx:1.29-alpine
|
|
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD wget -q --spider http://127.0.0.1/ || exit 1
|