5 Commits

Author SHA1 Message Date
wonder 64098a92d3 fix: change default external port from 8080 to 8081 to avoid conflict with slides-nginx
Deploy PR-Helper / deploy (push) Successful in 3m11s
2026-06-21 14:05:22 +08:00
wonder 99fb89c60d fix: use PORT env var for external port mapping, hardcode internal port to 8080 2026-06-20 23:16:11 +08:00
wonder 4d04153d61 refactor: remove embedded MySQL from docker-compose, use external data source 2026-06-20 23:08:10 +08:00
wonder 00c1839635 feat: migrate database from SQLite to MySQL with .env configuration
- Replace go-sqlite3 with go-sql-driver/mysql (pure Go, no CGO needed)
- Add joho/godotenv for .env file loading
- Rewrite database/db.go with MySQL-compatible DDL (BIGINT AUTO_INCREMENT, InnoDB, utf8mb4)
- Convert all SQLite-specific SQL: INSERT OR IGNORE → INSERT IGNORE,
  INSERT OR REPLACE → INSERT ... ON DUPLICATE KEY UPDATE,
  datetime('now') → NOW(), date arithmetic → DATE_SUB()
- Add MySQL config fields to config.go (host/port/user/password/database)
- Add .env.example with connection parameter template
- Update Dockerfile: remove CGO/gcc/musl dependency, smaller build
- Update docker-compose.yml: add MySQL service container with healthcheck
- Update CLAUDE.md documentation
2026-06-20 22:40:46 +08:00
wonder 446bb987f4 feat: 添加 Docker 部署配置 2026-06-20 00:06:10 +08:00