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:
v0
2025-06-19 21:46:26 +00:00
parent 36e768b38d
commit efdedf1a34
81 changed files with 8234 additions and 0 deletions

54
Makefile Normal file
View 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