bv74w9pgph / README.md
fefe45's picture
Initial deploy via automation script
e628c68 verified
|
Raw History Blame Contribute Delete
1.15 kB
---
title: Redirect Security
emoji: 🚀
colorFrom: blue
colorTo: indigo
sdk: docker
app_file: index.php
pinned: false
---
# PHP Redirector on Hugging Face Spaces
This repository contains a PHP redirect script configured to run on Hugging Face Spaces using the Docker SDK.
## Deployment Instructions
1. **Create a New Space**:
* Go to [Hugging Face Spaces](https://huggingface.co/spaces).
* Click "Create new Space".
* **Space SDK**: Select **Docker**.
* **Space Hardware**: The free tier (2 vCPU, 16GB RAM) is sufficient.
2. **Upload Files**:
* Push the contents of this repository to your Space.
3. **Configure Secrets**:
* Go to your Space's **Settings**.
* Scroll to **Variables and secrets**.
* Click **New secret**.
* **Name**: `API_KEY`
* **Value**: Your UltraPartners API Key (e.g., `26-c0f6f3fefa70cdb761af4e80aae635bf`).
## Local Development
To run locally with Docker:
```bash
docker build -t hf-php-app .
docker run -p 7860:7860 -e API_KEY="your_api_key_here" hf-php-app
```
Access the application at `http://localhost:7860`.