mirror of
https://github.com/EDeev/web-tech.git
synced 2026-10-07 20:49:39 +03:00
Docker-образ с сайтом (nginx) и релизы: образ публикуется в GHCR по тегу v*
This commit is contained in:
parent
c697e4cf4a
commit
c7fb09d5bf
5 changed files with 55 additions and 0 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.git
|
||||
.github
|
||||
docs
|
||||
*.md
|
||||
CNAME
|
||||
.htaccess
|
||||
35
.github/workflows/docker.yml
vendored
Normal file
35
.github/workflows/docker.yml
vendored
Normal 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
6
Dockerfile
Normal 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
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
[Русский](README.md) · **English**
|
||||
|
||||
[](https://github.com/EDeev/web-tech/actions/workflows/ci.yml)
|
||||
[](https://github.com/EDeev/web-tech/releases)
|
||||
|
||||
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.
|
||||
|
|
@ -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
|
||||
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
|
||||
|
||||
Coursework (Web Technologies Basics, Moscow Polytechnic University, 2025). The code is open for study;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
**Русский** · [English](README.en.md)
|
||||
|
||||
[](https://github.com/EDeev/web-tech/actions/workflows/ci.yml)
|
||||
[](https://github.com/EDeev/web-tech/releases)
|
||||
|
||||
Лабораторные по курсу «Основы веб-технологий» в Московском Политехе: от первой HTML-страницы до сайта
|
||||
сервиса доставки ланчей «ЭкоЛанч» с меню, корзиной и заказами через учебный API.
|
||||
|
|
@ -33,6 +34,9 @@
|
|||
Данные из API экранируются перед вставкой в страницу (функция `esc()`); CI проверяет синтаксис всех
|
||||
скриптов.
|
||||
|
||||
**Docker:** готовый образ с сайтом — `docker run -p 8080:80 ghcr.io/edeev/web-tech` (или `git.deev.su/edeev/web-tech`),
|
||||
сайт откроется на http://localhost:8080.
|
||||
|
||||
## Лицензия
|
||||
|
||||
Учебный проект (Основы веб-технологий, Московский Политех, 2025). Код открыт для изучения, отдельной
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue