From eafb2c70c8770ea84c6ae40b6a63cae949727da2 Mon Sep 17 00:00:00 2001 From: marvzhang Date: Wed, 4 Mar 2020 14:29:42 +0800 Subject: [PATCH] code cleanup --- Dockerfile | 4 +++- Dockerfile.local | 4 +++- crawlab.conf | 5 ----- {frontend/conf => nginx}/crawlab.conf | 1 - 4 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 crawlab.conf rename {frontend/conf => nginx}/crawlab.conf (94%) diff --git a/Dockerfile b/Dockerfile index d161ef1e..48f41d5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,9 @@ RUN cp /opt/bin/crawlab /usr/local/bin/crawlab-server # copy frontend files COPY --from=frontend-build /app/dist /app/dist -COPY --from=frontend-build /app/conf/crawlab.conf /etc/nginx/conf.d + +# copy nginx config files +COPY ./nginx/crawlab.conf /etc/nginx/conf.d # working directory WORKDIR /app/backend diff --git a/Dockerfile.local b/Dockerfile.local index eb06b7e6..d49df7db 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -49,7 +49,9 @@ RUN cp /opt/bin/crawlab /usr/local/bin/crawlab-server # copy frontend files COPY --from=frontend-build /app/dist /app/dist -COPY --from=frontend-build /app/conf/crawlab.conf /etc/nginx/conf.d + +# copy nginx config files +COPY ./nginx/crawlab.conf /etc/nginx/conf.d # working directory WORKDIR /app/backend diff --git a/crawlab.conf b/crawlab.conf deleted file mode 100644 index f0b7cef2..00000000 --- a/crawlab.conf +++ /dev/null @@ -1,5 +0,0 @@ -server { - listen 8080; - root /opt/crawlab/frontend/dist; - index index.html; -} \ No newline at end of file diff --git a/frontend/conf/crawlab.conf b/nginx/crawlab.conf similarity index 94% rename from frontend/conf/crawlab.conf rename to nginx/crawlab.conf index 80282fc4..fe911819 100644 --- a/frontend/conf/crawlab.conf +++ b/nginx/crawlab.conf @@ -2,7 +2,6 @@ server { gzip on; gzip_min_length 1k; gzip_buffers 4 16k; - #gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary off;