22
33## Install
44
5- Install Docker:
6-
7- * For Debian: Use ` docker-compose ` package.
8-
9- * For Ubuntu: Use ` docker-compose ` package.
10-
11- * [ For CentOS 7] ( https://docs.docker.com/engine/installation/linux/docker-ce/centos/ )
5+ Install Docker.
126
137[ Install Docker Compose] ( https://docs.docker.com/compose/install/ ) .
148
@@ -17,47 +11,47 @@ Install Git:
1711For Debian or Ubuntu:
1812
1913``` console
20- % sudo -H apt install -y -V git
14+ $ sudo -H apt install -y -V git
2115```
2216
23- For CentOS :
17+ For RHEL variants :
2418
2519``` console
26- % sudo -H yum install -y git
20+ $ sudo -H dnf install -y git
2721```
2822
2923Clone this repository:
3024
3125``` console
32- % sudo -H git clone https://github.com/ranguba/chupa-text-docker.git /var/lib/chupa-text
26+ $ sudo -H git clone https://github.com/ranguba/chupa-text-docker.git /var/lib/chupa-text
3327```
3428
3529Pull Docker images:
3630
3731``` console
38- % cd /var/lib/chupa-text
39- % sudo -H /usr/local/bin/ docker- compose pull
32+ $ cd /var/lib/chupa-text
33+ $ sudo -H docker compose pull
4034```
4135
4236If you want to change subnet for internal network from
4337` 172.18.0.0/24 ` , copy ` .env.example ` to ` .env ` and change the content:
4438
4539``` console
46- % cd /var/lib/chupa-text
47- % sudo -H cp -a .env{.example,}
48- % sudo -H editor .env
40+ $ cd /var/lib/chupa-text
41+ $ sudo -H cp -a .env{.example,}
42+ $ sudo -H editor .env
4943```
5044
5145Create log directory:
5246
5347``` console
54- % sudo -H mkdir -p /var/log/chupa-text
48+ $ sudo -H mkdir -p /var/log/chupa-text
5549```
5650
5751Install logrotate configuration:
5852
5953``` console
60- % sudo -H ln -fs \
54+ $ sudo -H ln -fs \
6155 /var/lib/chupa-text/etc/logrotate.d/chupa-text \
6256 /etc/logrotate.d/chupa-text
6357```
@@ -67,21 +61,21 @@ Install systemd service file:
6761For Debian and Ubuntu:
6862
6963``` console
70- % sudo -H ln -fs \
64+ $ sudo -H ln -fs \
7165 /var/lib/chupa-text/lib/systemd/system/chupa-text.service \
7266 /lib/systemd/system/chupa-text.service
73- % sudo -H systemctl daemon-reload
74- % sudo -H systemctl enable --now chupa-text
67+ $ sudo -H systemctl daemon-reload
68+ $ sudo -H systemctl enable --now chupa-text
7569```
7670
77- For CentOS 7 :
71+ For RHEL variants :
7872
7973``` console
80- % sudo -H ln -fs \
74+ $ sudo -H ln -fs \
8175 /var/lib/chupa-text/usr/lib/systemd/system/chupa-text.service \
8276 /usr/lib/systemd/system/chupa-text.service
83- % sudo -H systemctl daemon-reload
84- % sudo -H systemctl enable --now chupa-text
77+ $ sudo -H systemctl daemon-reload
78+ $ sudo -H systemctl enable --now chupa-text
8579```
8680
8781## Usage
@@ -119,7 +113,7 @@ Here is a `curl` command line to extract local PDF file at
119113value:
120114
121115``` console
122- % curl \
116+ $ curl \
123117 --form 'data=@/tmp/sample.pdf;type=application/pdf' \
124118 http://localhost:20080/extraction.json
125119```
@@ -185,7 +179,7 @@ If your user is a member of `docker` group, you can omit `sudo` like
185179the following:
186180
187181``` console
188- % /usr/local/bin/docker-compose \
182+ $ /usr/local/bin/docker-compose \
189183 --file /var/lib/chupa-text/docker-compose.yml \
190184 exec chupa-text \
191185 xvfb-run -a chupa-text /tmp/sample.pdf
@@ -195,11 +189,11 @@ Command line interface uses the same JSON format as Web API.
195189
196190## Author
197191
198- * Kouhei Sutou ` <kou@clear-code.com> `
192+ * Sutou Kouhei ` <kou@clear-code.com> `
199193
200194## License
201195
202196LGPL 2.1 or later.
203197
204- (Kouhei Sutou has a right to change the license including contributed
198+ (Sutou Kouhei has a right to change the license including contributed
205199patches.)
0 commit comments