Stop tracking config.yaml and document config via example file
config.yaml carried real secrets (jwt_key, DB password) despite already being listed in .gitignore. Untrack it, add config.example.yaml with placeholder values, and point the README setup steps at the example file.
This commit is contained in:
22
README.md
22
README.md
@@ -110,7 +110,7 @@ The API will be available at `http://localhost:5050`.
|
||||
|
||||
1. Start PostgreSQL (or use `docker compose up main-db -d`).
|
||||
|
||||
2. Update `config.yaml` — set `storage.host` to `localhost` and match your database credentials.
|
||||
2. Copy `config.example.yaml` to `config.yaml`, set `storage.host` to `localhost`, and fill in your database credentials and a JWT secret.
|
||||
|
||||
3. Apply migrations:
|
||||
|
||||
@@ -130,26 +130,6 @@ The API will be available at `http://localhost:5050`.
|
||||
go run app.go
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Settings are loaded from `config.yaml`:
|
||||
|
||||
```yaml
|
||||
is_debug: true
|
||||
listen:
|
||||
port: 5050
|
||||
jwt_key: <your-jwt-secret>
|
||||
storage:
|
||||
host: main-db # use localhost when running outside Docker
|
||||
port: 5432
|
||||
database: bank_db
|
||||
username: bank_admin
|
||||
password: <password>
|
||||
pg_pool_max_conn: 10
|
||||
public_file_path: ./public
|
||||
app_version: 0.0.1
|
||||
```
|
||||
|
||||
> **Note:** Replace default credentials before deploying to production.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user