chore: adding docs
This commit is contained in:
parent
23816d00f7
commit
81c5112409
39 changed files with 7257 additions and 2 deletions
102
data/docs/go-mad-installation.md
Normal file
102
data/docs/go-mad-installation.md
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<!-- go-doc:generated:begin source=go-mad:docs/installation.md signature=b649bc122c59343cfbc62626f6a7f52d generated=2026-10-05 18:14 UTC -->
|
||||
Imported from docs/installation.md in the go-mad repository.
|
||||
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Go 1.27.1 or later
|
||||
- Docker and Docker Compose (for containerized deployment)
|
||||
- Node.js and npm (for React frontend development)
|
||||
- PostgreSQL 15+ (or use Docker)
|
||||
|
||||
## Local Development
|
||||
|
||||
### 1. Clone the repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/your-organization/go-mad.git
|
||||
cd go-mad
|
||||
```
|
||||
|
||||
### 2. Install dependencies
|
||||
|
||||
```bash
|
||||
# Go dependencies
|
||||
go mod download
|
||||
|
||||
# Node dependencies
|
||||
npm install
|
||||
```
|
||||
|
||||
### 3. Set up the database
|
||||
|
||||
```bash
|
||||
# Using Docker Compose
|
||||
make compose-up
|
||||
|
||||
# Or manually
|
||||
createdb mad
|
||||
# Or set up PostgreSQL with user 'mad' and database 'mad'
|
||||
```
|
||||
|
||||
### 4. Configure the application
|
||||
|
||||
```bash
|
||||
# Create config.yaml
|
||||
cp config.example.yaml config.yaml
|
||||
# Edit config.yaml with your settings
|
||||
```
|
||||
|
||||
### 5. Run migrations
|
||||
|
||||
```bash
|
||||
make test
|
||||
# Or run manually
|
||||
go run ./cmd/go-mad
|
||||
```
|
||||
|
||||
The application will automatically run migrations on startup.
|
||||
|
||||
### 6. Start the development server
|
||||
|
||||
```bash
|
||||
# Development mode with hot reload
|
||||
make web-dev
|
||||
|
||||
# Or run the Go binary
|
||||
make run
|
||||
```
|
||||
|
||||
Access the application at `http://localhost:8080`
|
||||
|
||||
## Docker Deployment
|
||||
|
||||
```bash
|
||||
# Build and start
|
||||
docker compose up --build -d
|
||||
|
||||
# View logs
|
||||
docker compose logs -f
|
||||
|
||||
# Stop
|
||||
docker compose down
|
||||
```
|
||||
|
||||
## Kubernetes Deployment
|
||||
|
||||
```bash
|
||||
helm install go-mad oci://your-registry/go-mad/helm/go-mad
|
||||
```
|
||||
|
||||
## Production Checklist
|
||||
|
||||
- [ ] Change the default JWT secret
|
||||
- [ ] Configure proper PostgreSQL credentials
|
||||
- [ ] Set up HTTPS/TLS via ingress
|
||||
- [ ] Configure backups for the PostgreSQL data volume
|
||||
- [ ] Set up monitoring and logging
|
||||
- [ ] Review role-based access control settings
|
||||
<!-- go-doc:generated:end -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue