A simple website for generating pac, with customizable ports (default 1080).Can be deployed to a host such as vps or hosted on a provider such as Heroku.if you want use port 1088,you can use :host/pac?p=1088
.
├── app.json
├── getpac.py
├── manifest.yml
├── pac
│ ├── gfwlist.txt
│ └── user-rules.txt
├── Procfile
├── README.md
├── requirements.txt
└── runtime.txt
app.json
- for Heroku, Describe project information.
getpac.py
- app script.
manifest.yml
- for IBM Cloud Foundary, includes basic information about your app, such as the name, how much memory to allocate for each instance and the route.
pac/
- pac file.
Procfile
- to explicitly declare what command should be executed to start your app.
README.md
requirements.txt
- requirements file, which is used by Python’s dependency manager.
runtime.txt
- for Heroku (optional), specifying Python version.
about Procfile
- install requirements
pip3 install -r requirements.txt
- run app You can run it directly in python, though it's best deployed through a WSGI (uWSGI, FastCGI) service.
on Heroku
# creat an new app
heroku create
- init git repo and connet app repo on Heroku
git init
heroku git:remoter -a appname # <appname> is Heroku app name
- deploy on Heroku
git add .
git commit -m "commit info"
git push heroku master # push to master branch
1.Setting a PORT as a Heroku environment variable
port = int(os.getenv('PORT', 8000))
2.Missing Required Environment Variable
- set up a manifest.yml file,like this:
applications:
- name: GetStartedPython
random-route: true
memory: 128M
is your app name.
- push to IBM Cloud
ibmcloud cf push
When deployment completes you should see a message indicating that your app is running. You can also issue the following command to view your apps status and see the URL.
ibmcloud cf apps
Befor deploy to Heroku or IBM Cloud you need login your account.