3 Commits

Author SHA1 Message Date
admin 3c729c08ff Обновить RELEASES.md 2026-04-23 06:59:43 +00:00
admin b561412102 Обновить README.md 2026-04-23 06:58:54 +00:00
admin d84f1a93bf Обновить README.md 2026-04-23 06:48:33 +00:00
2 changed files with 218 additions and 143 deletions
+42 -2
View File
@@ -16,9 +16,15 @@ Requirements:
First setup: First setup:
1. Copy `.env.example` to `.env` 1. Copy `.env.example` to `.env`
2. Fill real values in `.env`: 2. Fill real values in `.env`:
- `POSTGRES_DB`
- `POSTGRES_USER`
- `POSTGRES_PASSWORD`
- `DATABASE_URL`
- `API_BASE_URL` - `API_BASE_URL`
- `API_BUY_PATH` - `API_BUY_PATH`
- `API_KEY` - `API_KEY`
- `ADMIN_EMAIL`
- `ADMIN_PASSWORD`
Make scripts executable once: Make scripts executable once:
@@ -38,23 +44,33 @@ One-click commands:
- `uninstall.sh` - stop and remove container(s) - `uninstall.sh` - stop and remove container(s)
- `reinstall.sh` - full restart with rebuild - `reinstall.sh` - full restart with rebuild
After install: `http://localhost:8080` If you see `/usr/bin/env: 'bash\r': No such file or directory`, convert line endings:
```bash
sed -i 's/\r$//' install.sh uninstall.sh reinstall.sh
chmod +x install.sh uninstall.sh reinstall.sh
```
After install: `http://localhost:3050`
## Run locally without Docker ## Run locally without Docker
1. Copy env file: 1. Copy env file:
- `.env.example` -> `.env` - `.env.example` -> `.env`
2. Set real values: 2. Set real values:
- `DATABASE_URL` (example: `postgres://postgres:postgres@localhost:5432/remnawave?sslmode=disable`)
- `API_BASE_URL` - `API_BASE_URL`
- `API_BUY_PATH` - `API_BUY_PATH`
- `API_KEY` - `API_KEY`
- `ADMIN_EMAIL`
- `ADMIN_PASSWORD`
3. Start: 3. Start:
```bash ```bash
go run . go run .
``` ```
Open: `http://localhost:8080` Open: `http://localhost:3050`
## Run in Docker Compose manually ## Run in Docker Compose manually
@@ -62,6 +78,18 @@ Open: `http://localhost:8080`
docker compose up --build docker compose up --build
``` ```
## Database (PostgreSQL 17)
- PostgreSQL 17 runs as `postgres` service in `docker-compose.yml`
- App uses `DATABASE_URL` to connect
- Tables are auto-created on startup:
- `users`
- `purchases`
- `servers`
- Admin user is auto-created/updated from:
- `ADMIN_EMAIL`
- `ADMIN_PASSWORD`
## External API contract expected ## External API contract expected
POST `${API_BASE_URL}${API_BUY_PATH}` POST `${API_BASE_URL}${API_BUY_PATH}`
@@ -79,6 +107,18 @@ Request JSON:
} }
``` ```
## Roles and admin panel
- Default registered users get role: `user`
- Built-in administrator is created from env:
- `ADMIN_EMAIL`
- `ADMIN_PASSWORD`
- Admin panel URL: `/admin`
- Admin features:
- Add VPN servers
- Toggle server status online/offline
- Delete servers
Response JSON: Response JSON:
```json ```json
+35
View File
@@ -1,5 +1,40 @@
# Releases # Releases
## v0.5.0 - PostgreSQL 17 integration
### Added
- PostgreSQL 17 service in `docker-compose.yml`.
- Persistent volume `remnawave_pgdata`.
- DB env variables in `.env.example`:
- `POSTGRES_DB`
- `POSTGRES_USER`
- `POSTGRES_PASSWORD`
- `DATABASE_URL`
### Changed
- Application storage migrated from in-memory to PostgreSQL for:
- users
- purchases
- admin servers
- Auto DB initialization on startup (`CREATE TABLE IF NOT EXISTS`).
- Admin user is upserted from `ADMIN_EMAIL`/`ADMIN_PASSWORD` at startup.
- Documentation updated with PostgreSQL section.
---
## v0.4.0 - Default port changed to 3050
### Changed
- Application default bind port changed from `8080` to `3050`.
- Docker and docs updated to use `3050`:
- `main.go` default `APP_ADDR` -> `:3050`
- `docker-compose.yml` port mapping -> `3050:3050`
- `Dockerfile` `EXPOSE 3050`
- `install.sh`/`reinstall.sh` URL output -> `http://localhost:3050`
- `README.md` URLs updated to `http://localhost:3050`
---
## v0.3.0 - Ubuntu one-click lifecycle ## v0.3.0 - Ubuntu one-click lifecycle
### Added ### Added