mirror of
https://github.com/AndersPier/v0-v0app.git
synced 2025-10-27 10:06:52 +00:00
feat: add complete Docker setup for markdown editor
Create Docker configuration files and setup commands #VERCEL_SKIP Co-authored-by: Anders Lehmann Pier <3219386+AndersPier@users.noreply.github.com>
This commit is contained in:
54
Makefile
Normal file
54
Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
# Makefile for Markdown Editor Docker operations
|
||||
|
||||
.PHONY: help build run stop clean logs shell health
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@echo "Available commands:"
|
||||
@echo " build - Build the Docker image"
|
||||
@echo " run - Run the application with docker-compose"
|
||||
@echo " run-prod - Run with nginx reverse proxy"
|
||||
@echo " stop - Stop all containers"
|
||||
@echo " clean - Remove containers and images"
|
||||
@echo " logs - Show application logs"
|
||||
@echo " shell - Open shell in the app container"
|
||||
@echo " health - Check application health"
|
||||
|
||||
# Build the Docker image
|
||||
build:
|
||||
docker-compose build --no-cache
|
||||
|
||||
# Run the application (development)
|
||||
run:
|
||||
docker-compose up -d markdown-editor
|
||||
@echo "Application is running at http://localhost:3000"
|
||||
|
||||
# Run with production setup (nginx + app)
|
||||
run-prod:
|
||||
docker-compose --profile production up -d
|
||||
@echo "Application is running at http://localhost (port 80)"
|
||||
|
||||
# Stop all containers
|
||||
stop:
|
||||
docker-compose down
|
||||
|
||||
# Clean up containers and images
|
||||
clean:
|
||||
docker-compose down --rmi all --volumes --remove-orphans
|
||||
docker system prune -f
|
||||
|
||||
# Show logs
|
||||
logs:
|
||||
docker-compose logs -f markdown-editor
|
||||
|
||||
# Open shell in the app container
|
||||
shell:
|
||||
docker-compose exec markdown-editor sh
|
||||
|
||||
# Check application health
|
||||
health:
|
||||
@echo "Checking application health..."
|
||||
@curl -f http://localhost:3000/api/health || echo "Health check failed"
|
||||
|
||||
# Quick development cycle
|
||||
dev: stop build run logs
|
||||
Reference in New Issue
Block a user