mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
commit
33c3e74b49
15
Dockerfile
15
Dockerfile
@ -1,18 +1,11 @@
|
|||||||
# Builder
|
# Builder
|
||||||
FROM node:14-buster as builder
|
FROM node:14-buster as builder
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
|
RUN yarn install --legacy-peer-deps
|
||||||
RUN npm install --legacy-peer-deps
|
RUN yarn run build
|
||||||
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# App
|
# App
|
||||||
FROM nginx:alpine
|
FROM nginxinc/nginx-unprivileged
|
||||||
|
|
||||||
COPY --from=builder /src/out /app
|
COPY --from=builder /src/out /app
|
||||||
|
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||||
RUN rm -rf /usr/share/nginx/html \
|
|
||||||
&& ln -s /app /usr/share/nginx/html
|
|
||||||
|
@ -60,7 +60,7 @@ A Docker file is provided in the root of the repository.
|
|||||||
If you want to run JSON Visio locally:
|
If you want to run JSON Visio locally:
|
||||||
|
|
||||||
* Build Docker image with `docker build -t jsonvisio .`
|
* 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]
|
* 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