- monorepo: pnpm workspace + go.work + pyproject.toml + commitlint/husky - infra: docker-compose (minimal + full profiles) + init-sql + prometheus - arch-scan: multi-language scanner skeleton (TS/Go/Python/Proto) - shared-proto: buf v2 + classes.proto (ClassService CRUD contract) - api-gateway: Go/Gin + JWT HS256 auth + reverse proxy + request ID - classes: NestJS golden template (error system + observability + middleware + CRUD + tests) - teacher-portal: Next.js + paper-feel UI design system - CI/CD: 4 workflows (go/ts/py/proto) - docs: migration guide + project_rules + coding-standards + git-workflow + ui-design-system + 004 + 9 module READMEs + known-issues + spec/plan migration + roadmap
154 lines
4.0 KiB
YAML
154 lines
4.0 KiB
YAML
name: edu-full
|
|
services:
|
|
mysql:
|
|
image: mysql:8.0
|
|
container_name: edu-mysql
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-changeme}
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE:-next_edu_cloud}
|
|
MYSQL_USER: ${MYSQL_USER:-edu}
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-changeme}
|
|
ports:
|
|
- "3306:3306"
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
- ./init-sql:/docker-entrypoint-initdb.d:ro
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: edu-redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
kafka:
|
|
image: confluentinc/cp-kafka:7.6.0
|
|
container_name: edu-kafka
|
|
profiles: ["p3", "p4", "p5", "p6"]
|
|
restart: unless-stopped
|
|
depends_on:
|
|
zookeeper:
|
|
condition: service_healthy
|
|
environment:
|
|
KAFKA_BROKER_ID: 1
|
|
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
|
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
|
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
|
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
|
|
ports:
|
|
- "9092:9092"
|
|
healthcheck:
|
|
test: ["CMD", "kafka-topics", "--bootstrap-server", "localhost:9092", "--list"]
|
|
interval: 15s
|
|
timeout: 10s
|
|
retries: 5
|
|
zookeeper:
|
|
image: confluentinc/cp-zookeeper:7.6.0
|
|
container_name: edu-zookeeper
|
|
profiles: ["p3", "p4", "p5", "p6"]
|
|
restart: unless-stopped
|
|
environment:
|
|
ZOOKEEPER_CLIENT_PORT: 2181
|
|
healthcheck:
|
|
test: ["CMD", "nc", "-z", "localhost", "2181"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
clickhouse:
|
|
image: clickhouse/clickhouse-server:24.3
|
|
container_name: edu-clickhouse
|
|
profiles: ["p4", "p5", "p6"]
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8123:8123"
|
|
- "9000:9000"
|
|
volumes:
|
|
- clickhouse_data:/var/lib/clickhouse
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8123/ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
neo4j:
|
|
image: neo4j:5.20
|
|
container_name: edu-neo4j
|
|
profiles: ["p4", "p5", "p6"]
|
|
restart: unless-stopped
|
|
environment:
|
|
NEO4J_AUTH: neo4j/${NEO4J_PASSWORD:-changeme}
|
|
ports:
|
|
- "7474:7474"
|
|
- "7687:7687"
|
|
volumes:
|
|
- neo4j_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "cypher-shell", "-u", "neo4j", "-p", "${NEO4J_PASSWORD:-changeme}", "RETURN 1"]
|
|
interval: 15s
|
|
timeout: 10s
|
|
retries: 5
|
|
elasticsearch:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.0
|
|
container_name: edu-es
|
|
profiles: ["p5", "p6"]
|
|
restart: unless-stopped
|
|
environment:
|
|
discovery.type: single-node
|
|
xpack.security.enabled: "false"
|
|
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
|
|
ports:
|
|
- "9200:9200"
|
|
volumes:
|
|
- es_data:/usr/share/elasticsearch/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health"]
|
|
interval: 15s
|
|
timeout: 10s
|
|
retries: 5
|
|
jaeger:
|
|
image: jaegertracing/all-in-one:1.57
|
|
container_name: edu-jaeger
|
|
profiles: ["observability"]
|
|
restart: unless-stopped
|
|
environment:
|
|
COLLECTOR_OTLP_ENABLED: "true"
|
|
ports:
|
|
- "16686:16686"
|
|
- "4318:4318"
|
|
prometheus:
|
|
image: prom/prometheus:v0.51.0
|
|
container_name: edu-prometheus
|
|
profiles: ["observability"]
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
ports:
|
|
- "9090:9090"
|
|
grafana:
|
|
image: grafana/grafana:10.4.0
|
|
container_name: edu-grafana
|
|
profiles: ["observability"]
|
|
restart: unless-stopped
|
|
environment:
|
|
GF_SECURITY_ADMIN_PASSWORD: admin
|
|
ports:
|
|
- "3001:3001"
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
volumes:
|
|
mysql_data:
|
|
redis_data:
|
|
clickhouse_data:
|
|
neo4j_data:
|
|
es_data:
|
|
grafana_data: |