File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ **
2+
3+ ! /package.json
4+ ! /bin /build-site.js
5+ ! /bin /install-jekyll.sh
6+ ! /package-lock.json
7+ ! /docs /Gemfile
8+ ! /docs /Gemfile.lock
Original file line number Diff line number Diff line change @@ -118,6 +118,10 @@ Now you can build the site and start the dev server with:
118118
119119You should now find the documentation at http://127.0.0.1:4000
120120
121+ You can also build and run the documentation with docker:
122+
123+ $ npm run dev-site-with-docker
124+
121125Writing a PouchDB Blog Post
122126--------------------------------------
123127
Original file line number Diff line number Diff line change 1+ # maintain similarity to CI by using common base image:
2+ FROM ubuntu:20.04
3+
4+ RUN apt-get update && \
5+ apt-get --yes install \
6+ build-essential \
7+ curl \
8+ ruby-full \
9+ && \
10+ apt-get clean && \
11+ rm -rf /var/lib/apt/lists/*
12+
13+ # TODO confirm ruby version is 2.7... if it matters
14+ RUN gem install bundler -v 2.1.4
15+
16+ ENV NODE_VERSION=22.12.0
17+ ENV NVM_DIR=/root/.nvm
18+ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
19+ RUN . "$NVM_DIR/nvm.sh" && nvm install 22
20+ ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}"
21+
22+ WORKDIR /pouchdb-docs
23+
24+ COPY ./docs/ ./docs-bundler
25+ RUN cd docs-bundler && bundle install
26+
27+ COPY package.json package-lock.json .
28+ RUN npm install --ci
29+
30+ COPY ./bin/ ./bin/
31+
32+ CMD ["npm" , "run" , "build-site" ]
Original file line number Diff line number Diff line change 2323 "install-jekyll" : " ./bin/install-jekyll.sh" ,
2424 "publish-site" : " ./bin/publish-site.sh" ,
2525 "build-site" : " node ./bin/build-site.js" ,
26+ "dev-site-with-docker" : " docker build --file docs-dev.Dockerfile --progress=plain . && docker run -it --rm --volume $PWD/docs:/pouchdb-docs/docs -p 4000:4000 $(docker build --quiet .)" ,
2627 "test-coverage" : " ./bin/test-coverage.sh" ,
2728 "coverage" : " COVERAGE=1 SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find ./bin/test-coverage.sh" ,
2829 "build-test" : " npm run build-test-utils && npm run build-perf" ,
You can’t perform that action at this time.
0 commit comments