mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-23 06:11:58 +00:00
Introduce a Dockerfile for building the Palmr application with multi-stage builds for both server and web components. Update docker-compose.yaml to consolidate services under a single 'palmr' service, ensuring proper health checks and environment variable configurations. Add a .dockerignore file to optimize Docker builds by excluding unnecessary files. Include a Makefile for simplified build and deployment commands.
47 lines
1.3 KiB
Makefile
47 lines
1.3 KiB
Makefile
.PHONY: help build start clean logs stop restart
|
|
|
|
# Default target
|
|
help:
|
|
@echo "🚀 Palmr - Available Commands:"
|
|
@echo ""
|
|
@echo " make build - Build Docker image with multi-platform support"
|
|
@echo " make start - Start the application using docker-compose"
|
|
@echo " make stop - Stop all running containers"
|
|
@echo " make logs - Show application logs"
|
|
@echo " make clean - Clean up containers and images"
|
|
@echo " make shell - Access the application container shell"
|
|
@echo ""
|
|
@echo "📁 Scripts location: ./infra/"
|
|
|
|
# Build Docker image using the build script
|
|
build:
|
|
@echo "🏗️ Building Palmr Docker image..."
|
|
@chmod +x ./infra/build-docker.sh
|
|
@./infra/build-docker.sh
|
|
|
|
# Start the application
|
|
start:
|
|
@echo "🚀 Starting Palmr application..."
|
|
@docker-compose up -d
|
|
|
|
# Stop the application
|
|
stop:
|
|
@echo "🛑 Stopping Palmr application..."
|
|
@docker-compose down
|
|
|
|
# Show logs
|
|
logs:
|
|
@echo "📋 Showing Palmr logs..."
|
|
@docker-compose logs -f
|
|
|
|
# Clean up containers and images
|
|
clean:
|
|
@echo "🧹 Cleaning up Docker containers and images..."
|
|
@docker-compose down -v
|
|
@docker system prune -f
|
|
@echo "✅ Cleanup completed!"
|
|
|
|
# Access container shell
|
|
shell:
|
|
@echo "🐚 Accessing Palmr container shell..."
|
|
@docker-compose exec palmr /bin/sh
|