Сделал копирование, почистил репо, перешёл на версию 1.0.0
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# irandom
|
||||
|
||||
Сервис генерации случайных значений: числа из диапазона, выбор из списка, орёл/решка.
|
||||
Vue 3 + Vite + Element Plus. Тема и брендинг настраиваются через env / Docker.
|
||||
|
||||
**Версия:** `1.0.0`
|
||||
|
||||
## Setup
|
||||
```
|
||||
npm install
|
||||
@@ -9,18 +14,10 @@ npm install
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
or
|
||||
```
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Production build
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Preview production build
|
||||
```
|
||||
npm run preview
|
||||
```
|
||||
|
||||
@@ -29,43 +26,17 @@ npm run preview
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customization
|
||||
Copy `.env.example` to `.env` and set branding / theme variables.
|
||||
`npm run serve` / `npm run build` regenerates `public/config.js` automatically.
|
||||
|
||||
### Docker
|
||||
Build and run (config via environment, same keys as `.env.example`):
|
||||
## Customization
|
||||
Copy `.env.example` to `.env` and set `IRANDOM_*` variables
|
||||
(name, title, logo URL, colors, default locale).
|
||||
`npm run serve` / `npm run build` regenerates `public/config.js`.
|
||||
|
||||
## Docker
|
||||
```
|
||||
docker compose up --build
|
||||
```
|
||||
→ http://localhost:8080
|
||||
|
||||
Open http://localhost:8080
|
||||
|
||||
Change branding without rebuilding the image — only restart with new env:
|
||||
|
||||
```
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Or:
|
||||
|
||||
```
|
||||
docker build -t irandom .
|
||||
docker run --rm -p 8080:80 ^
|
||||
-e IRANDOM_NAME=LuckyPenguin ^
|
||||
-e IRANDOM_COLOR_PRIMARY=#3DDC97 ^
|
||||
irandom
|
||||
```
|
||||
|
||||
### Offline (PWA)
|
||||
Production build registers a service worker and caches the app shell.
|
||||
After opening the site once online:
|
||||
|
||||
```
|
||||
npm run build
|
||||
npm run preview
|
||||
```
|
||||
|
||||
you can reload without network — generators keep working.
|
||||
`config.js` uses NetworkFirst (fresh when online, cached when offline).
|
||||
## Offline (PWA)
|
||||
After one online visit to a production build (`build` + `preview` or Docker),
|
||||
the app shell works offline. Runtime branding updates title, theme-color, icons and manifest.
|
||||
|
||||
Reference in New Issue
Block a user