1
0
Fork 0
mirror of https://github.com/EDeev/web-tech.git synced 2026-10-08 04:59:38 +03:00

Docker-образ с сайтом (nginx) и релизы: образ публикуется в GHCR по тегу v*

This commit is contained in:
Деев Егор Викторович 2026-10-06 22:12:21 +03:00
parent c697e4cf4a
commit c7fb09d5bf
5 changed files with 55 additions and 0 deletions

6
.dockerignore Normal file
View file

@ -0,0 +1,6 @@
.git
.github
docs
*.md
CNAME
.htaccess

35
.github/workflows/docker.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: Docker
on:
push:
tags: ["v*"]
workflow_dispatch:
jobs:
image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/edeev/web-tech
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest
- uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

6
Dockerfile Normal file
View file

@ -0,0 +1,6 @@
# Сайт курса «Основы веб-технологий» (лабораторные и задания) — статика за nginx
FROM nginx:1.27-alpine
COPY index.html /usr/share/nginx/html/
COPY labs /usr/share/nginx/html/labs
COPY tasks /usr/share/nginx/html/tasks
EXPOSE 80

View file

@ -3,6 +3,7 @@
[Русский](README.md) · **English** [Русский](README.md) · **English**
[![CI](https://github.com/EDeev/web-tech/actions/workflows/ci.yml/badge.svg)](https://github.com/EDeev/web-tech/actions/workflows/ci.yml) [![CI](https://github.com/EDeev/web-tech/actions/workflows/ci.yml/badge.svg)](https://github.com/EDeev/web-tech/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/EDeev/web-tech)](https://github.com/EDeev/web-tech/releases)
Labs for the "Web Technologies Basics" course at Moscow Polytechnic University: from a first HTML page to Labs for the "Web Technologies Basics" course at Moscow Polytechnic University: from a first HTML page to
the "EcoLunch" lunch delivery site with a menu, cart and orders through the course API. the "EcoLunch" lunch delivery site with a menu, cart and orders through the course API.
@ -33,6 +34,9 @@ Polytech course API; the API key was issued by the course and lives in the lab c
API data is escaped before being inserted into the page (the `esc()` function); CI checks the syntax of API data is escaped before being inserted into the page (the `esc()` function); CI checks the syntax of
all scripts. all scripts.
**Docker:** a prebuilt image with the site — `docker run -p 8080:80 ghcr.io/edeev/web-tech` (or `git.deev.su/edeev/web-tech`),
then open http://localhost:8080.
## License ## License
Coursework (Web Technologies Basics, Moscow Polytechnic University, 2025). The code is open for study; Coursework (Web Technologies Basics, Moscow Polytechnic University, 2025). The code is open for study;

View file

@ -3,6 +3,7 @@
**Русский** · [English](README.en.md) **Русский** · [English](README.en.md)
[![CI](https://github.com/EDeev/web-tech/actions/workflows/ci.yml/badge.svg)](https://github.com/EDeev/web-tech/actions/workflows/ci.yml) [![CI](https://github.com/EDeev/web-tech/actions/workflows/ci.yml/badge.svg)](https://github.com/EDeev/web-tech/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/EDeev/web-tech)](https://github.com/EDeev/web-tech/releases)
Лабораторные по курсу «Основы веб-технологий» в Московском Политехе: от первой HTML-страницы до сайта Лабораторные по курсу «Основы веб-технологий» в Московском Политехе: от первой HTML-страницы до сайта
сервиса доставки ланчей «ЭкоЛанч» с меню, корзиной и заказами через учебный API. сервиса доставки ланчей «ЭкоЛанч» с меню, корзиной и заказами через учебный API.
@ -33,6 +34,9 @@
Данные из API экранируются перед вставкой в страницу (функция `esc()`); CI проверяет синтаксис всех Данные из API экранируются перед вставкой в страницу (функция `esc()`); CI проверяет синтаксис всех
скриптов. скриптов.
**Docker:** готовый образ с сайтом — `docker run -p 8080:80 ghcr.io/edeev/web-tech` (или `git.deev.su/edeev/web-tech`),
сайт откроется на http://localhost:8080.
## Лицензия ## Лицензия
Учебный проект (Основы веб-технологий, Московский Политех, 2025). Код открыт для изучения, отдельной Учебный проект (Основы веб-технологий, Московский Политех, 2025). Код открыт для изучения, отдельной