| @@ -1,7 +1,10 @@ | |||
| FROM node:16 AS builder | |||
| WORKDIR /app | |||
| # Copy all files from current directory to working dir in image | |||
| COPY package*.json /app/ | |||
| RUN npm install | |||
| COPY ./ /app/ | |||
| @@ -12,5 +15,6 @@ FROM nginx:alpine | |||
| WORKDIR /usr/share/nginx/html | |||
| RUN rm -rf ./* | |||
| COPY --from=builder /app/build . | |||
| COPY nginx.conf /etc/nginx/conf.d/default.conf | |||
| # Containers run nginx with global directives and daemon off | |||
| ENTRYPOINT ["nginx", "-g", "daemon off;"] | |||
| @@ -0,0 +1,10 @@ | |||
| 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,6 +1,6 @@ | |||
| { | |||
| "name": "web", | |||
| "version": "4.0.23", | |||
| "version": "4.0.25", | |||
| "private": true, | |||
| "dependencies": { | |||
| "@emotion/react": "^11.5.0", | |||
| @@ -89,4 +89,4 @@ | |||
| "eslint-plugin-react-hooks": "^4.2.0", | |||
| "prettier": "2.3.1" | |||
| } | |||
| } | |||
| } | |||
| @@ -141,8 +141,7 @@ const Header = () => { | |||
| } | |||
| if (!routeMatches(HOME_PAGE) && !routeMatches(BASE_PAGE)) { | |||
| const newQueryString = new URLSearchParams({ search: value }); | |||
| history.push({ | |||
| pathname: HOME_PAGE, | |||
| history.replace({ | |||
| search: newQueryString.toString(), | |||
| }); | |||
| } else { | |||