Explorar el Código

Fixed: NGINX config bug for 404 pages

bugfix/3392
dusan.lazarevic hace 3 años
padre
commit
b050e541c0
Se han modificado 3 ficheros con 15 adiciones y 1 borrados
  1. 4
    0
      Dockerfile
  2. 10
    0
      nginx.conf
  3. 1
    1
      package.json

+ 4
- 0
Dockerfile Ver fichero


FROM node:16 AS builder FROM node:16 AS builder


WORKDIR /app WORKDIR /app
# Copy all files from current directory to working dir in image # Copy all files from current directory to working dir in image


COPY package*.json /app/ COPY package*.json /app/
RUN npm install RUN npm install
COPY ./ /app/ COPY ./ /app/
WORKDIR /usr/share/nginx/html WORKDIR /usr/share/nginx/html
RUN rm -rf ./* RUN rm -rf ./*
COPY --from=builder /app/build . COPY --from=builder /app/build .
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Containers run nginx with global directives and daemon off # Containers run nginx with global directives and daemon off
ENTRYPOINT ["nginx", "-g", "daemon off;"] ENTRYPOINT ["nginx", "-g", "daemon off;"]

+ 10
- 0
nginx.conf Ver fichero

server {
listen 80;
server_name "https://trampa-api.dilig.net";

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}
}

+ 1
- 1
package.json Ver fichero

{ {
"name": "web", "name": "web",
"version": "4.0.23",
"version": "4.0.24",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@emotion/react": "^11.5.0", "@emotion/react": "^11.5.0",

Cargando…
Cancelar
Guardar