Add initial project configuration and setup for Reference Board Viewer application. Include EditorConfig for consistent coding styles, pre-commit hooks for linting and formatting, Docker Compose for local development with PostgreSQL and MinIO, and a Nix flake for development environment management. Establish CI/CD pipeline for automated testing and deployment.

This commit is contained in:
Danilo Reyes
2025-11-01 22:28:46 -06:00
parent 58f463867e
commit 1bc657e0fd
33 changed files with 1756 additions and 38 deletions

115
docker-compose.dev.yml Normal file
View File

@@ -0,0 +1,115 @@
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: webref-postgres
environment:
POSTGRES_DB: webref
POSTGRES_USER: webref
POSTGRES_PASSWORD: webref_dev_password
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U webref"]
interval: 10s
timeout: 5s
retries: 5
networks:
- webref-network
# MinIO Object Storage
minio:
image: minio/minio:latest
container_name: webref-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- "9000:9000" # API
- "9001:9001" # Console UI
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
networks:
- webref-network
# MinIO Client - Create buckets on startup
minio-init:
image: minio/mc:latest
container_name: webref-minio-init
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb myminio/webref --ignore-existing;
/usr/bin/mc policy set public myminio/webref;
exit 0;
"
networks:
- webref-network
# Redis (optional - for caching/background tasks)
redis:
image: redis:7-alpine
container_name: webref-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- webref-network
# pgAdmin (optional - database management UI)
pgadmin:
image: dpage/pgadmin4:latest
container_name: webref-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@webref.local
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- "5050:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- postgres
networks:
- webref-network
volumes:
postgres_data:
driver: local
minio_data:
driver: local
redis_data:
driver: local
pgadmin_data:
driver: local
networks:
webref-network:
driver: bridge
# Usage:
# Start all services: docker-compose -f docker-compose.dev.yml up -d
# Stop all services: docker-compose -f docker-compose.dev.yml down
# View logs: docker-compose -f docker-compose.dev.yml logs -f
# Reset volumes: docker-compose -f docker-compose.dev.yml down -v