#!/usr/bin/env python3 """ Hugging Face Space entry point for WordPress with SQLite This file is required by Hugging Face Spaces to properly start the Docker container. """ import os import subprocess import time import sys def main(): """ Main entry point for the Hugging Face Space This will start the WordPress container and keep it running """ print("šŸš€ Starting WordPress with SQLite for Hugging Face Space...") # Check if we're running in a Docker container if os.path.exists('/.dockerenv'): print("āœ… Running inside Docker container") # If we're in Docker, the container should already be set up # Just keep the process alive try: while True: time.sleep(60) # Optional: Add health check here print("šŸ’“ WordPress container is running...") except KeyboardInterrupt: print("\nšŸ›‘ Shutting down WordPress...") sys.exit(0) else: print("āŒ This should run inside a Docker container") print("Please deploy this to Hugging Face Spaces with Docker SDK") sys.exit(1) if __name__ == "__main__": main()