Documentation Index
Fetch the complete documentation index at: https://docs-mstore.faisalaffan.com/llms.txt
Use this file to discover all available pages before exploring further.
Deployment Topology
Panduan lengkap deployment dari local development sampai production environment.
🏗️ Environment Overview
💻 Development Environment
Docker Compose Setup
version: '3.8'
services:
mysql:
image: mysql:8.0
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: windsurf_db
volumes:
- mysql_data:/var/lib/mysql
mongodb:
image: mongo:7.0
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
redis:
image: redis:7.0
ports:
- "6379:6379"
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
mysql_data:
mongo_data:
🚀 Production Topology
📦 Container Deployment
Dockerfile
# Build stage
FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o main ./cmd/api
# Runtime stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/main .
COPY --from=builder /app/configs ./configs
EXPOSE 8080
CMD ["./main"]
🔄 CI/CD Pipeline
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
docker build -t app:latest .
docker push app:latest
- name: Deploy
run: kubectl apply -f k8s/
System Overview
Arsitektur sistem