Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating docs to include install for alpine and node 12 #424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,28 @@ on the mode used, of course):
[rewrite]: http://docs.couchdb.org/en/latest/api/ddoc/rewrites.html
[virtual host]: http://docs.couchdb.org/en/latest/config/http.html#vhosts

## Installing on Alpine Linux based images

You need the following packages:
* build-base
* python

```bash
apk --no-cache add --virtual builds-deps build-base python
```
We recommend using no-cache and virtual, in order to keep the resulting container size same.

Alpine linux based images _use musl libc_ instead of the standard glibc and thus are _not compatible with compiled binaries_. node-pre-gyp currently does not test the pre-compiled binaries to be ABI-compatible and thus you may see segfaults. We are working to resolve this issue.

As a workaround, In alpine based images, force recompiling the leveldown native addon after a npm install with this command: `npm rebuild leveldown --build-from-source`.

```Dockerfile
RUN apk --no-cache add --virtual builds-deps build-base python
RUN yarn --production && npm rebuild leveldown --build-from-source
CMD node node_modules/pouchdb-server -p 5432
```


Getting Help
------------

Expand Down