Trying nginx instead
All checks were successful
Build and Test - Staging / test (pull_request) Successful in 1s
Build and Test - Staging / deploy_staging (pull_request) Successful in 3s
Build and Test - Staging / determine_version (pull_request) Successful in 27s
Build and Test - Staging / build_and_push (pull_request) Successful in 2m35s
All checks were successful
Build and Test - Staging / test (pull_request) Successful in 1s
Build and Test - Staging / deploy_staging (pull_request) Successful in 3s
Build and Test - Staging / determine_version (pull_request) Successful in 27s
Build and Test - Staging / build_and_push (pull_request) Successful in 2m35s
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -19,13 +19,11 @@ RUN echo "PUBLIC_REPO_VERSION_HASH=\"${REPO_VERSION_HASH}\" \n\
|
|||||||
PUBLIC_BUILD_ENVIRONMENT=\"${BUILD_ENVIRONMENT}\"" >> .env
|
PUBLIC_BUILD_ENVIRONMENT=\"${BUILD_ENVIRONMENT}\"" >> .env
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM httpd:2.4 AS runtime
|
FROM nginx:alpine AS runtime
|
||||||
WORKDIR /usr/local/apache2/htdocs
|
|
||||||
|
|
||||||
RUN rm index.html
|
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
COPY --from=build /app/dist .
|
RUN chown -R nginx:nginx /usr/share/nginx/html
|
||||||
|
|
||||||
RUN chown -R www-data:www-data *
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
31
nginx/nginx.conf
Normal file
31
nginx/nginx.conf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
worker_processes 4;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length 1000;
|
||||||
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
|
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
|
||||||
|
error_page 404 /404.html;
|
||||||
|
location = /404.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/index.html =404;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user