Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 10, 2025
1 parent a008695 commit 735bb02
Showing 1 changed file with 23 additions and 29 deletions.
52 changes: 23 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@

## Install

Install Docker:

* For Debian: Use `docker-compose` package.

* For Ubuntu: Use `docker-compose` package.

* [For CentOS 7](https://docs.docker.com/engine/installation/linux/docker-ce/centos/)
Install Docker.

[Install Docker Compose](https://docs.docker.com/compose/install/).

Expand All @@ -17,47 +11,47 @@ Install Git:
For Debian or Ubuntu:

```console
% sudo -H apt install -y -V git
$ sudo -H apt install -y -V git
```

For CentOS:
For RHEL variants:

```console
% sudo -H yum install -y git
$ sudo -H dnf install -y git
```

Clone this repository:

```console
% sudo -H git clone https://github.com/ranguba/chupa-text-docker.git /var/lib/chupa-text
$ sudo -H git clone https://github.com/ranguba/chupa-text-docker.git /var/lib/chupa-text
```

Pull Docker images:

```console
% cd /var/lib/chupa-text
% sudo -H /usr/local/bin/docker-compose pull
$ cd /var/lib/chupa-text
$ sudo -H docker compose pull
```

If you want to change subnet for internal network from
`172.18.0.0/24`, copy `.env.example` to `.env` and change the content:

```console
% cd /var/lib/chupa-text
% sudo -H cp -a .env{.example,}
% sudo -H editor .env
$ cd /var/lib/chupa-text
$ sudo -H cp -a .env{.example,}
$ sudo -H editor .env
```

Create log directory:

```console
% sudo -H mkdir -p /var/log/chupa-text
$ sudo -H mkdir -p /var/log/chupa-text
```

Install logrotate configuration:

```console
% sudo -H ln -fs \
$ sudo -H ln -fs \
/var/lib/chupa-text/etc/logrotate.d/chupa-text \
/etc/logrotate.d/chupa-text
```
Expand All @@ -67,21 +61,21 @@ Install systemd service file:
For Debian and Ubuntu:

```console
% sudo -H ln -fs \
$ sudo -H ln -fs \
/var/lib/chupa-text/lib/systemd/system/chupa-text.service \
/lib/systemd/system/chupa-text.service
% sudo -H systemctl daemon-reload
% sudo -H systemctl enable --now chupa-text
$ sudo -H systemctl daemon-reload
$ sudo -H systemctl enable --now chupa-text
```

For CentOS 7:
For RHEL variants:

```console
% sudo -H ln -fs \
$ sudo -H ln -fs \
/var/lib/chupa-text/usr/lib/systemd/system/chupa-text.service \
/usr/lib/systemd/system/chupa-text.service
% sudo -H systemctl daemon-reload
% sudo -H systemctl enable --now chupa-text
$ sudo -H systemctl daemon-reload
$ sudo -H systemctl enable --now chupa-text
```

## Usage
Expand Down Expand Up @@ -119,7 +113,7 @@ Here is a `curl` command line to extract local PDF file at
value:

```console
% curl \
$ curl \
--form 'data=@/tmp/sample.pdf;type=application/pdf' \
http://localhost:20080/extraction.json
```
Expand Down Expand Up @@ -185,7 +179,7 @@ If your user is a member of `docker` group, you can omit `sudo` like
the following:

```console
% /usr/local/bin/docker-compose \
$ /usr/local/bin/docker-compose \
--file /var/lib/chupa-text/docker-compose.yml \
exec chupa-text \
xvfb-run -a chupa-text /tmp/sample.pdf
Expand All @@ -195,11 +189,11 @@ Command line interface uses the same JSON format as Web API.

## Author

* Kouhei Sutou `<[email protected]>`
* Sutou Kouhei `<[email protected]>`

## License

LGPL 2.1 or later.

(Kouhei Sutou has a right to change the license including contributed
(Sutou Kouhei has a right to change the license including contributed
patches.)

0 comments on commit 735bb02

Please sign in to comment.