Files
shop10/docs/RELEASE-0.10.md

76 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Релиз 0.10.0
Интернет-магазин на Node.js + PostgreSQL 17.
## Вариант A — Docker Compose
```bash
git clone https://git.evilfox.cc/test/shop10.git /opt/shop/shop10 && cd /opt/shop/shop10
git checkout v0.10.0
cp .env.docker.example .env
# SESSION_SECRET=...
docker compose up -d --build
curl -s http://127.0.0.1:3000/health
```
Сайт: http://localhost:3000
С HTTPS (Caddy в контейнере):
```bash
# TRUST_PROXY=1 в .env, правьте caddy/Caddyfile.docker.example
docker compose --profile proxy up -d --build
```
## Вариант B — без Docker (Ubuntu)
```bash
git clone https://git.evilfox.cc/test/shop10.git /opt/shop/shop10 && cd /opt/shop/shop10
git checkout v0.10.0
apt install -y git curl
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt install -y nodejs postgresql-17 postgresql-client-17
bash scripts/setup-postgres-ubuntu.sh
cp .env.example .env
# DATABASE_URL, SESSION_SECRET, HOST=127.0.0.1, TRUST_PROXY=1
npm install --omit=dev
cp deploy/shop.service /etc/systemd/system/
systemctl daemon-reload && systemctl enable --now shop
curl -s http://127.0.0.1:3000/health
```
Caddy на хосте — см. `README.md`, раздел «Caddy».
## Обновление с более ранних версий
- С **0.10-beta**: `git pull`, `npm install`, `systemctl restart shop`
## Тег и Release в Gitea
Тег уже в репозитории:
```bash
git fetch --tags
git checkout v0.10.0
```
**Release на сайте Gitea** (раздел Releases, не только Tags):
1. Откройте: `https://git.evilfox.cc/test/shop10/releases/new`
2. Tag: `v0.10.0`, Title: `0.10.0`
3. Описание — из файла `.release-notes/v0.10.0.md`
Или из CLI (нужен токен):
```bash
export GITEA_TOKEN=ваш_токен
bash scripts/publish-gitea-release.sh 0.10.0
```