Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Add requirements.txt, update README and .env.example
Browse files Browse the repository at this point in the history
Added a requirements.txt for dependency management for other users to utilize.

Updated README.md with relevant documentation on how to use the Python script.

Updated the environment example file to include quotes.
  • Loading branch information
garrettsummerfi3ld committed Feb 1, 2023
1 parent 6a63563 commit 137e972
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Production server related settings
PRODUCTION_SERVER=
PRODUCTION_USERNAME=
PRODUCTION_PASSWORD=
PRODUCTION_SERVER=""
PRODUCTION_USERNAME=""
PRODUCTION_PASSWORD=""

# Staging server related settings
STAGING_SERVER=
STAGING_API_KEY=
STAGING_SERVER=""
STAGING_API_KEY=""
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
# mcserver-ftp-sync

Syncs Minecraft servers with staging and production

## Prerequisites

* wget (for downloading from the FTP server)
* This is already installed on most Linux distributions
* Python 3.6+
* API Credentials to access the FTP server and the Pterodactyl Panel
* Specific permissions needed are all files permissions and the ability to stop and start the server

## How to use

1. Clone repository
2. `cp .env.example .env`
3. Modify `.env` to your needs
4. `pip install -r requirements.txt`
5. `python3 sync.py`

## Example configuration

```env
# Production server related settings
PRODUCTION_SERVER="" # The IP address of the server without the ftp:// prefix
PRODUCTION_USERNAME="" # The username to access the FTP server
PRODUCTION_PASSWORD="" # The password to access the FTP server
# Staging server related settings
STAGING_SERVER="" # The panel URL
STAGING_API_KEY="" # The API key to access the Pterodactyl Panel
```
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
py_dactyl==2.0.0
python-dotenv==0.21.1
requests==2.28.1

0 comments on commit 137e972

Please sign in to comment.