mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
prettify nginx, dockerfile updates
This commit is contained in:
@@ -24,7 +24,6 @@ RUN npm start
|
|||||||
WORKDIR /src/app/coriolis
|
WORKDIR /src/app/coriolis
|
||||||
RUN git fetch --all
|
RUN git fetch --all
|
||||||
RUN git reset --hard origin/$BRANCH
|
RUN git reset --hard origin/$BRANCH
|
||||||
RUN rm -rf node_modules/
|
|
||||||
RUN npm install --no-package-lock
|
RUN npm install --no-package-lock
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
@@ -33,5 +32,6 @@ RUN npm run build
|
|||||||
FROM nginx:1.13.12-alpine as web
|
FROM nginx:1.13.12-alpine as web
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY --from=builder /src/app/coriolis/build /usr/share/nginx/html
|
COPY --from=builder /src/app/coriolis/build /usr/share/nginx/html
|
||||||
|
WORKDIR /usr/share/nginx/html
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-c", "/etc/nginx/nginx.conf", "-g", "daemon off;"]
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
dockerfile: coriolis/.docker/Dockerfile
|
dockerfile: coriolis/.docker/Dockerfile
|
||||||
context: ../..
|
context: ../..
|
||||||
environment:
|
args:
|
||||||
BRANCH: master
|
branch: master
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- coriolis_web
|
- coriolis_web
|
||||||
@@ -22,9 +22,13 @@ services:
|
|||||||
build:
|
build:
|
||||||
dockerfile: coriolis/.docker/Dockerfile
|
dockerfile: coriolis/.docker/Dockerfile
|
||||||
context: ../..
|
context: ../..
|
||||||
|
args:
|
||||||
|
branch: master
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
volumes:
|
||||||
BRANCH: feature/docker-deployment
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||||
|
ports:
|
||||||
|
- 8090:80
|
||||||
networks:
|
networks:
|
||||||
- coriolis_web
|
- coriolis_web
|
||||||
- default
|
- default
|
||||||
|
|||||||
@@ -1,38 +1,45 @@
|
|||||||
user nobody;
|
worker_processes 1;
|
||||||
worker_processes auto; # it will be determinate automatically by the number of core
|
user nobody nobody;
|
||||||
|
error_log /tmp/error.log;
|
||||||
error_log /var/log/nginx/error.log warn;
|
pid /tmp/nginx.pid;
|
||||||
#pid /var/run/nginx.pid; # it permit you to use /etc/init.d/nginx reload|restart|stop|start
|
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
|
||||||
|
worker_connections 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
sendfile on;
|
|
||||||
access_log /var/log/nginx/access.log;
|
|
||||||
keepalive_timeout 3000;
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
|
|
||||||
index index.html;
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
client_body_temp_path /tmp/client_body;
|
||||||
|
fastcgi_temp_path /tmp/fastcgi_temp;
|
||||||
|
proxy_temp_path /tmp/proxy_temp;
|
||||||
|
scgi_temp_path /tmp/scgi_temp;
|
||||||
|
uwsgi_temp_path /tmp/uwsgi_temp;
|
||||||
|
access_log /tmp/access.log;
|
||||||
|
error_log /tmp/error.log;
|
||||||
|
|
||||||
server_name localhost;
|
keepalive_timeout 3000;
|
||||||
root /usr/share/nginx/html;
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
index index.html;
|
||||||
|
server_name localhost;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
autoindex on;
|
||||||
|
|
||||||
location ~* \.(?:manifest|appcache|html?|xml|json|css|js|map|jpg|jpeg|gif|png|ico|svg|eot|ttf|woff|woff2)$ {
|
location ~* \.(?:manifest|appcache|html?|xml|json|css|js|map|jpg|jpeg|gif|png|ico|svg|eot|ttf|woff|woff2)$ {
|
||||||
expires -1;
|
expires -1;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
add_header Access-Control-Allow-Credentials true;
|
add_header Access-Control-Allow-Credentials true;
|
||||||
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
|
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
|
||||||
add_header Access-Control-Allow-Headers 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
|
add_header Access-Control-Allow-Headers 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
|
||||||
access_log off;
|
access_log off;
|
||||||
}
|
}
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html =404;
|
try_files $uri $uri/ /index.html =404;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user