🐳 feat: implement Docker multi-stage build with caching optimization
Added Docker build infrastructure: - Multi-stage build (builder, cache, production) - Dependency hashing for cache invalidation - GNU tar support for cache compatibility - Production and development Dockerfiles - Docker Compose for local development Build Optimization: - Dependency-based cache keys - Layer caching strategy - Cross-platform compatibility - Gitea Actions cache integration Files Added: - docker/Dockerfile.build - Build environment - docker/Dockerfile.prod - Production image - docker/Dockerfile.prod.template - Template-based generation - docker-compose.yml - Development setup - scripts/calculate-deps-hash.sh - Cache key calculation - scripts/test-docker-cache.sh - Cache testing Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: dance-lessons-coach-postgres
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: dance_lessons_coach
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- dance-lessons-coach-network
|
||||
restart: unless-stopped
|
||||
|
||||
# Application service (for reference)
|
||||
# app:
|
||||
# build: .
|
||||
# container_name: dance-lessons-coach-app
|
||||
# ports:
|
||||
# - "8080:8080"
|
||||
# environment:
|
||||
# - DLC_DATABASE_HOST=postgres
|
||||
# - DLC_DATABASE_PORT=5432
|
||||
# - DLC_DATABASE_USER=postgres
|
||||
# - DLC_DATABASE_PASSWORD=postgres
|
||||
# - DLC_DATABASE_NAME=dance_lessons_coach
|
||||
# - DLC_DATABASE_SSL_MODE=disable
|
||||
# depends_on:
|
||||
# postgres:
|
||||
# condition: service_healthy
|
||||
# restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
dance-lessons-coach-network:
|
||||
name: dance-lessons-coach-network
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user