Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

dockerfile improvement

Lex Rivera5eebab6f7fc5
diff --git a/Dockerfile b/Dockerfile
index c08154a4..943ed404 100644
--- a/Dockerfile
+++ b/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
diff --git a/default.conf b/default.conf
new file mode 100644
index 00000000..c97e2055
--- /dev/null
+++ b/default.conf
@@ -0,0 +1,9 @@
+server {
+ listen 8080;
+ root /app;
+ include /etc/nginx/mime.types;
+
+ location /editor {
+ try_files $uri /editor.html;
+ }
+}