Commit 16d20e21 authored by Patipat Jo's avatar Patipat Jo
Browse files

Update from-source.md

parent 57010c28
...@@ -324,33 +324,27 @@ sudo supervisorctl reload ...@@ -324,33 +324,27 @@ sudo supervisorctl reload
### 15. ติดตั้งและตั้งค่า DataPusher ### 15. ติดตั้งและตั้งค่า DataPusher
```sh ```sh
# Install requirements for the DataPusher sudo apt-get install python-dev python-virtualenv build-essential libxslt1-dev libxml2-dev git libffi-dev
sudo apt-get install python-dev python-virtualenv build-essential libxslt1-dev libxml2-dev git libffi-dev
# Create a virtualenv for datapusher sudo virtualenv /usr/lib/ckan/datapusher
sudo virtualenv /usr/lib/ckan/datapusher
# Create a source directory and switch to it sudo mkdir /usr/lib/ckan/datapusher/src
sudo mkdir /usr/lib/ckan/datapusher/src
cd /usr/lib/ckan/datapusher/src
# Clone the source (you should target the latest tagged version) cd /usr/lib/ckan/datapusher/src
sudo git clone https://gitlab.nectec.or.th/opend/datapusher.git
# Install the DataPusher and its requirements sudo git clone https://gitlab.nectec.or.th/opend/datapusher.git
cd datapusher
sudo /usr/lib/ckan/datapusher/bin/pip install --use-feature=2020-resolver -r requirements.txt
sudo /usr/lib/ckan/datapusher/bin/python setup.py develop
# Install uWSGI cd datapusher
sudo /usr/lib/ckan/datapusher/bin/pip install uwsgi
# copy deployment to /etc/ckan/datapusher sudo /usr/lib/ckan/datapusher/bin/pip install --use-feature=2020-resolver -r requirements.txt
sudo cp -r /usr/lib/ckan/datapusher/src/datapusher/deployment /etc/ckan/datapusher
sudo chown `whoami` /etc/ckan/datapusher
# Create CKAN log folder sudo /usr/lib/ckan/datapusher/bin/python setup.py develop
sudo mkdir -p /var/log/ckan
sudo /usr/lib/ckan/datapusher/bin/pip install uwsgi
sudo cp -r /usr/lib/ckan/datapusher/src/datapusher/deployment /etc/ckan/datapusher
sudo chown `whoami` /etc/ckan/datapusher
``` ```
สร้างไฟล์ supervisor config สำหรับ datapusher สร้างไฟล์ supervisor config สำหรับ datapusher
...@@ -388,8 +382,8 @@ stopwaitsecs = 600 ...@@ -388,8 +382,8 @@ stopwaitsecs = 600
; Required for uWSGI as it does not obey SIGTERM. ; Required for uWSGI as it does not obey SIGTERM.
stopsignal=QUIT stopsignal=QUIT
``` ```
ทำการ reload supervisor
ทำการ reload supervisor
```sh ```sh
sudo supervisorctl reload sudo supervisorctl reload
``` ```
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment