FtpHook is a Flask-based application designed to download the latest release from a GitHub repository and manage files via FTP.
- Fetch the latest release from a GitHub repository.
- Download release assets matching a specific pattern (
release-*.tar.gz). - Upload files to an FTP server.
- Environment variable support using
python-dotenv.
- Python 3.7 or higher
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/aliesm-com/FtpHook.git cd FtpHook -
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the root directory and add the following:API_KEY=your_api_key GITHUB_TOKEN=your_github_token FTP_HOST=ftp_host FTP_USER=ftp_user FTP_PASSWORD=ftp_password
-
Start the Flask application:
python app.py
-
Access the application at
http://localhost:5000.
-
Build and run the Docker container:
docker-compose up --build
-
Access the application at
http://localhost:5000.
app.py: Main application logic.requirements.txt: Python dependencies.Dockerfile: Docker image configuration.docker-compose.yml: Docker Compose configuration.README.md: Project documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.
For any inquiries, please contact the repository owner.