mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-13 02:56:39 +07:00
feat: автосоздавать .env из .env.example при первом запуске
Раньше при отсутствии .env docker compose тихо стартовал на дефолтах из docker-compose.yml (без пароля, дефолтные креды Postgres), никак не сигнализируя об этом. Добавлен start.sh — обёртка над docker compose up -d --build, которая при отсутствии .env создаёт его из .env.example и один раз громко предупреждает об используемых дефолтах перед стартом контейнеров. README обновлён на использование этого скрипта.
This commit is contained in:
@@ -129,11 +129,13 @@ Everything else in `.env` (currency, CORS, the port Aurum listens on) has a sens
|
||||
### 4. Start it
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
./start.sh
|
||||
```
|
||||
|
||||
This builds the backend and frontend images, starts Postgres, waits for it to report healthy, then starts the backend (which runs every database migration automatically — nothing to do by hand) and finally the frontend. First run takes a minute or two; after that, images are cached and it's seconds.
|
||||
|
||||
`start.sh` is a thin wrapper around `docker compose up -d --build` — if you skipped step 3 and there's no `.env` yet, it creates one from `.env.example` and prints a warning about the defaults it's running on (no password, default Postgres credentials) before starting anything, instead of silently starting an unprotected instance. You can still run `docker compose up -d --build` directly if you prefer; just make sure `.env` exists first.
|
||||
|
||||
### 5. Open it
|
||||
|
||||
Visit **http://localhost:3000** (or whatever port you set via `AURUM_WEB_PORT` in `.env`). A default account and the standard expense/income categories are seeded automatically — there's nothing to configure before you can add your first transaction.
|
||||
|
||||
Reference in New Issue
Block a user