mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
add Docker
This commit is contained in:
parent
978aaa8342
commit
e6224e2d0d
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM node:alpine
|
||||
|
||||
RUN apk update && \
|
||||
apk add --update --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing \
|
||||
g++ \
|
||||
git \
|
||||
make \
|
||||
bash \
|
||||
python \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
RUN mkdir -p /docs
|
||||
WORKDIR /docs
|
||||
|
||||
COPY package.json .
|
||||
|
||||
RUN npm install && npm cache clean --force
|
23
README.md
23
README.md
@ -21,6 +21,7 @@
|
||||
- [Adding docs](#adding-docs)
|
||||
- [Repositories](#repositories)
|
||||
- [Development](#development)
|
||||
- [Use Docker](#use-docker)
|
||||
- [Authors](#authors)
|
||||
- [License](#license)
|
||||
|
||||
@ -76,7 +77,12 @@ The repositories list is currently sourced from the [`/data/repositories.yml`](d
|
||||
|
||||
The site is a React app built with [Gatsby](https://www.gatsbyjs.org), pulling its content from various sources.
|
||||
|
||||
To start development, clone this repo, install all dependencies, and start the development server:
|
||||
As a prerequisite you'll need on your machine:
|
||||
|
||||
- Node.js
|
||||
- npm
|
||||
|
||||
Clone this repo, install all dependencies, and start the development server:
|
||||
|
||||
```bash
|
||||
git clone git@github.com:oceanprotocol/docs.git
|
||||
@ -88,6 +94,21 @@ npm start
|
||||
|
||||
This will start a hot-reloading local server exposed under [localhost:8000](http://localhost:8000).
|
||||
|
||||
### Use Docker
|
||||
|
||||
Alternatively, you can use Docker for which you need to have installed on your machine:
|
||||
|
||||
- [Docker](https://www.docker.com)
|
||||
- [Docker Compose](https://docs.docker.com/compose/)
|
||||
|
||||
Then use Compose to bring everything up:
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
This will expose a hot-reloading server under [localhost:8000](http://localhost:8000).
|
||||
|
||||
## Authors
|
||||
|
||||
- Troy McConaghy ([@ttmc](https://github.com/ttmc)) - [Ocean Protocol](https://oceanprotocol.com)
|
||||
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '3'
|
||||
services:
|
||||
gatsby:
|
||||
build: .
|
||||
command: ./node_modules/gatsby/dist/bin/gatsby.js develop --host 0.0.0.0
|
||||
volumes:
|
||||
- .:/docs
|
||||
- /docs/node_modules
|
||||
ports:
|
||||
- '8000:8000'
|
Loading…
Reference in New Issue
Block a user