Browse Source

Merge pull request #24 from jcalonso/main

Add Dockerfile
Aykut Saraç 3 years ago
parent
commit
80e0a8c234
2 changed files with 32 additions and 2 deletions
  1. 18 0
      Dockerfile
  2. 14 2
      README.md

+ 18 - 0
Dockerfile

@@ -0,0 +1,18 @@
+# Builder
+FROM node:14-buster as builder
+
+WORKDIR /src
+
+COPY . /src
+
+RUN npm install --legacy-peer-deps
+
+RUN npm run build
+
+# App
+FROM nginx:alpine
+
+COPY --from=builder /src/out /app
+
+RUN rm -rf /usr/share/nginx/html \
+  && ln -s /app /usr/share/nginx/html

+ 14 - 2
README.md

@@ -52,14 +52,26 @@ JSON Visio is data visualization tool for your json data which seamlessly illust
 
 <div align="center">
   <img width="800" src="https://github.com/AykutSarac/jsonvisio.com/blob/main/public/preview_2.png" alt="preview 1" />
-  </div>
+</div>
+
 
 ## 🛠 Development Setup
 
-```sh
+```console
   npm install --legacy-peer-deps
   npm run dev
 ```
+  
+## 🐳 Docker
+
+```
+A Docker file is provided in the root of the repository.
+If you want to run JSON Visio locally:
+  
+* Build Docker image with `docker build -t jsonvisio .`
+* Run locally with `docker run -p 8888:80 jsonvisio`
+* Go to [http://localhost:8888]
+```
 
 ## License