Skip to content

Commit bf61d15

Browse files
committed
update readme and config example
1 parent 2e3b260 commit bf61d15

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

README.rst

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
proxy_py README
22
===============
33

4-
proxy_py is a program which collects proxies, saves them in a database
5-
and makes periodically checks.
4+
proxy_py is a program which collects proxies, saves them in
5+
a database and makes periodically checks.
66
It has a server for getting proxies with nice API(see below).
77

88
Where is the documentation?
99
***************************
1010

11-
It's here -> http://proxy-py.readthedocs.io
11+
It's here -> https://proxy-py.readthedocs.io
1212

1313
How to build?
1414
*************
@@ -48,7 +48,7 @@ I'm too lazy. Can I just use it?
4848

4949
`TODO: update, old version!`
5050

51-
Yes, you can download virtualbox image
51+
Yep, you can download virtualbox image
5252
here -> https://drive.google.com/file/d/1oPf6xwOADRH95oZW0vkPr1Uu_iLDe9jc/view?usp=sharing
5353

5454
After downloading check that port forwarding is still working,
@@ -203,7 +203,7 @@ anything, just run
203203
204204
inside virtual environment in proxy_py project directory.
205205

206-
How to deploy on production using supervisor, nginx and postgresql in 8 steps?
206+
How to deploy on production using supervisor, nginx and postgresql in 9 steps?
207207
******************************************************************************
208208

209209
1 Install supervisor, nginx and postgresql
@@ -212,15 +212,26 @@ How to deploy on production using supervisor, nginx and postgresql in 8 steps?
212212
213213
root@server:~$ apt install supervisor nginx postgresql
214214
215-
2 Create virtual environment and install requirements on it
215+
2 Clone this repository
216216

217-
3 Copy settings.py example:
217+
.. code-block:: bash
218+
219+
user@server:~/$ git clone https://github.com/DevAlone/proxy_py.git
220+
221+
3 Create virtual environment and install requirements on it
222+
223+
.. code-block:: bash
224+
225+
user@server:~/proxy_py$ python3 -m venv env
226+
user@server:~/proxy_py$ pip3 install -r requirements.txt
227+
228+
4 Copy settings.py example:
218229

219230
.. code-block:: bash
220231
221-
proxy_py@server:~/proxy_py$ cp config_examples/settings.py proxy_py/
232+
proxy_py@server:~/proxy_py$ cp config_examples/settings.py ./
222233
223-
4 create unprivileged user in postgresql database
234+
5 create unprivileged user in postgresql database
224235
and change database authentication data in settings.py
225236

226237
.. code-block:: bash
@@ -237,22 +248,22 @@ and change database authentication data in settings.py
237248
# 'max_connections': 20,
238249
}
239250
240-
5 Copy supervisor config example and change it for your case
251+
6 Copy supervisor config example and change it for your case
241252

242253
.. code-block:: bash
243254
244255
cp /home/proxy_py/proxy_py/config_examples/proxy_py.supervisor.conf /etc/supervisor/conf.d/proxy_py.conf
245256
vim /etc/supervisor/conf.d/proxy_py.conf
246257
247-
6 Copy nginx config example, enable it and change if you need
258+
7 Copy nginx config example, enable it and change if you need
248259

249260
.. code-block:: bash
250261
251262
cp /home/proxy_py/proxy_py/config_examples/proxy_py.nginx.conf /etc/nginx/sites-available/proxy_py
252263
ln -s /etc/nginx/sites-available/proxy_py /etc/nginx/sites-enabled/
253264
vim /etc/nginx/sites-available/proxy_py
254265
255-
7 Restart supervisor and Nginx
266+
8 Restart supervisor and Nginx
256267

257268
.. code-block:: bash
258269
@@ -261,7 +272,7 @@ and change database authentication data in settings.py
261272
/etc/init.d/nginx configtest
262273
/etc/init.d/nginx restart
263274
264-
8 Enjoy using it on your server!
275+
9 Enjoy using it on your server!
265276

266277
What is it depend on?
267278
*********************

config_examples/settings.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
from ._settings import *
22

3-
DATABASE_CONNECTION_KWARGS = {
4-
'database': 'YOUR_POSTGRES_DATABASE',
5-
'user': 'YOUR_POSTGRES_USER',
6-
'password': 'YOUR_POSTGRES_PASSWORD',
7-
# number of simultaneous connections
8-
# 'max_connections': 20,
9-
}
3+
DATABASE_CONNECTION_KWARGS['database'] = 'proxy_py'
4+
DATABASE_CONNECTION_KWARGS['user'] = 'proxy_py'
5+
DATABASE_CONNECTION_KWARGS['password'] = 'proxy_py'
106

117
DEBUG = False

0 commit comments

Comments
 (0)