.PHONY: dev prod build logs stop clean restart shell local local-build .DEFAULT_GOAL := dev # Development mode with hot reload dev: @echo "Starting mcserial docs in development mode..." APP_ENV=dev docker compose up -d --build @echo "Site available at https://$(shell grep PUBLIC_DOMAIN .env | cut -d= -f2)" @sleep 2 docker compose logs -f # Production mode with static build prod: @echo "Starting mcserial docs in production mode..." APP_ENV=prod docker compose up -d --build @echo "Site available at https://$(shell grep PUBLIC_DOMAIN .env | cut -d= -f2)" @sleep 2 docker compose logs -f # Build without starting build: docker compose build # View logs logs: docker compose logs -f # Stop containers stop: docker compose down # Clean up containers, images, volumes clean: docker compose down -v --rmi local # Restart containers restart: stop dev # Shell into running container shell: docker compose exec docs sh # Local development without Docker local: npm run dev # Production build locally local-build: npm run build && npm run preview