mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-20 05:12:54 +08:00
commit
33c3e74b49
15
Dockerfile
15
Dockerfile
@ -1,18 +1,11 @@
|
||||
# Builder
|
||||
FROM node:14-buster as builder
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . /src
|
||||
|
||||
RUN npm install --legacy-peer-deps
|
||||
|
||||
RUN npm run build
|
||||
RUN yarn install --legacy-peer-deps
|
||||
RUN yarn run build
|
||||
|
||||
# App
|
||||
FROM nginx:alpine
|
||||
|
||||
FROM nginxinc/nginx-unprivileged
|
||||
COPY --from=builder /src/out /app
|
||||
|
||||
RUN rm -rf /usr/share/nginx/html \
|
||||
&& ln -s /app /usr/share/nginx/html
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||
|
@ -60,7 +60,7 @@ 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`
|
||||
* Run locally with `docker run -p 8888:8080 jsonvisio`
|
||||
* Go to [http://localhost:8888]
|
||||
```
|
||||
|
||||
|
9
default.conf
Normal file
9
default.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 8080;
|
||||
root /app;
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
location /editor {
|
||||
try_files $uri /editor.html;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user