mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-23 06:11:58 +00:00
chore: add Dockerfile, docker-compose, and .dockerignore for multi-service setup
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.
This commit is contained in:
47
Makefile
Normal file
47
Makefile
Normal file
@@ -0,0 +1,47 @@
|
||||
.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
|
Reference in New Issue
Block a user