feat: add docker-compose.dev.yml - development environment infrastructure
Provides comprehensive development stack with: - PostgreSQL 16 with health checks and initialization scripts - Redis 7 for caching and job queues - MinIO for S3-compatible object storage with auto bucket creation - ClamAV for antivirus scanning capabilities - MailHog for email testing - Proper networking, volumes, and health checks - Development-optimized configurations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7f719bcaec
commit
f9fe71d286
1 changed files with 135 additions and 0 deletions
135
docker-compose.dev.yml
Normal file
135
docker-compose.dev.yml
Normal file
|
@ -0,0 +1,135 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
# PostgreSQL Database
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: ai-renamer-postgres-dev
|
||||
environment:
|
||||
POSTGRES_DB: ai_image_renamer_dev
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: dev_password_123
|
||||
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_dev_data:/var/lib/postgresql/data
|
||||
- ./db/init:/docker-entrypoint-initdb.d
|
||||
networks:
|
||||
- ai-renamer-dev
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d ai_image_renamer_dev"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# Redis Cache & Queue
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: ai-renamer-redis-dev
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_dev_data:/data
|
||||
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||
networks:
|
||||
- ai-renamer-dev
|
||||
restart: unless-stopped
|
||||
command: redis-server /usr/local/etc/redis/redis.conf
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# MinIO Object Storage
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
container_name: ai-renamer-minio-dev
|
||||
environment:
|
||||
MINIO_ROOT_USER: minio_dev_user
|
||||
MINIO_ROOT_PASSWORD: minio_dev_password_123
|
||||
MINIO_CONSOLE_ADDRESS: ":9001"
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
volumes:
|
||||
- minio_dev_data:/data
|
||||
networks:
|
||||
- ai-renamer-dev
|
||||
restart: unless-stopped
|
||||
command: server /data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 30s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
|
||||
# MinIO Client for bucket initialization
|
||||
minio-client:
|
||||
image: minio/mc:latest
|
||||
container_name: ai-renamer-minio-client-dev
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- ai-renamer-dev
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
sleep 5;
|
||||
/usr/bin/mc alias set minio http://minio:9000 minio_dev_user minio_dev_password_123;
|
||||
/usr/bin/mc mb minio/images --ignore-existing;
|
||||
/usr/bin/mc mb minio/processed --ignore-existing;
|
||||
/usr/bin/mc mb minio/temp --ignore-existing;
|
||||
/usr/bin/mc policy set public minio/images;
|
||||
/usr/bin/mc policy set public minio/processed;
|
||||
echo 'MinIO buckets created successfully';
|
||||
"
|
||||
|
||||
# ClamAV Antivirus Scanner
|
||||
clamav:
|
||||
image: clamav/clamav:latest
|
||||
container_name: ai-renamer-clamav-dev
|
||||
ports:
|
||||
- "3310:3310"
|
||||
volumes:
|
||||
- clamav_dev_data:/var/lib/clamav
|
||||
networks:
|
||||
- ai-renamer-dev
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
CLAMAV_NO_FRESHCLAMD: "false"
|
||||
CLAMAV_NO_CLAMD: "false"
|
||||
healthcheck:
|
||||
test: ["CMD", "clamdscan", "--ping"]
|
||||
interval: 60s
|
||||
timeout: 30s
|
||||
retries: 3
|
||||
start_period: 300s
|
||||
|
||||
# Mailhog for email testing
|
||||
mailhog:
|
||||
image: mailhog/mailhog:latest
|
||||
container_name: ai-renamer-mailhog-dev
|
||||
ports:
|
||||
- "8025:8025" # Web UI
|
||||
- "1025:1025" # SMTP
|
||||
networks:
|
||||
- ai-renamer-dev
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_dev_data:
|
||||
driver: local
|
||||
redis_dev_data:
|
||||
driver: local
|
||||
minio_dev_data:
|
||||
driver: local
|
||||
clamav_dev_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
ai-renamer-dev:
|
||||
driver: bridge
|
||||
name: ai-renamer-dev-network
|
Loading…
Add table
Add a link
Reference in a new issue