push
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
*.md
|
||||
.git
|
||||
@@ -0,0 +1,16 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM nginx:1.27-alpine
|
||||
|
||||
LABEL service="web" description="Static HTML served by nginx"
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
# Все файлы из ./html попадают в образ при сборке (воспроизводимо, без docker cp)
|
||||
COPY html/ /usr/share/nginx/html/
|
||||
|
||||
RUN chown -R nginx:nginx /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget -qO- http://127.0.0.1/ >/dev/null || exit 1
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Demo Web</title>
|
||||
<style>
|
||||
body { font-family: system-ui, sans-serif; max-width: 40rem; margin: 2rem auto; padding: 0 1rem; }
|
||||
code { background: #f4f4f4; padding: 0.15rem 0.35rem; border-radius: 4px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Сервис <code>web</code></h1>
|
||||
<p>Эта страница попала в контейнер при <strong>сборке образа</strong> (<code>COPY</code> в Dockerfile).</p>
|
||||
<p>API стека: <a href="/api/health">/api/health</a>, список заметок: <a href="/api/notes">/api/notes</a>.</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user