feat(backend,docker,docs): implement Go/Gin/SQLite REST API server, Docker containerization, and architecture specifications

- Implement standalone Go backend API server using Gin and pure-Go SQLite (modernc.org/sqlite)
- Add 11-table schema DDL migrations (000001_init.up.sql) based on DATA_TABLE.md
- Add seed data ingestion tool (cmd/seed) and static TypeScript content exporter (cmd/export-content)
- Add configuration loader (internal/config) supporting environment variables and .env files (HOST, PORT, DB_PATH, GIN_MODE, CORS_ALLOW_ORIGINS, AUTO_MIGRATE)
- Add lightweight multi-stage Dockerfile and docker-compose.yml with persistent SQLite volume
- Add comprehensive architecture specification (ARCHITECTURE.md) and REST API interface specification (API_INTERFACE.md)
- Harmonize frontend publications page to consume isHighlight flag from database-synced content
This commit is contained in:
2026-08-24 17:34:51 +09:00
parent 75bf334fec
commit fb6881070c
53 changed files with 8432 additions and 488 deletions
+27
View File
@@ -0,0 +1,27 @@
services:
anl-backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: anl-backend-api
restart: unless-stopped
ports:
- "8080:8080"
environment:
- HOST=0.0.0.0
- PORT=8080
- DB_PATH=/app/data/anl.db
- GIN_MODE=release
- CORS_ALLOW_ORIGINS=*
- AUTO_MIGRATE=true
volumes:
- anl-db-data:/app/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/v1/health"]
interval: 30s
timeout: 3s
retries: 3
volumes:
anl-db-data:
name: anl-sqlite-storage