소스 검색

Merged #2249

bugfix/3392
jovan.cirkovic 2 년 전
부모
커밋
fbc8ab05b2
4개의 변경된 파일17개의 추가작업 그리고 4개의 파일을 삭제
  1. 4
    0
      Dockerfile
  2. 10
    0
      nginx.conf
  3. 2
    2
      package.json
  4. 1
    2
      src/components/Header/Header.js

+ 4
- 0
Dockerfile 파일 보기


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 파일 보기

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;
}
}

+ 2
- 2
package.json 파일 보기

{ {
"name": "web", "name": "web",
"version": "4.0.23",
"version": "4.0.25",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@emotion/react": "^11.5.0", "@emotion/react": "^11.5.0",
"eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-hooks": "^4.2.0",
"prettier": "2.3.1" "prettier": "2.3.1"
} }
}
}

+ 1
- 2
src/components/Header/Header.js 파일 보기

} }
if (!routeMatches(HOME_PAGE) && !routeMatches(BASE_PAGE)) { if (!routeMatches(HOME_PAGE) && !routeMatches(BASE_PAGE)) {
const newQueryString = new URLSearchParams({ search: value }); const newQueryString = new URLSearchParams({ search: value });
history.push({
pathname: HOME_PAGE,
history.replace({
search: newQueryString.toString(), search: newQueryString.toString(),
}); });
} else { } else {

Loading…
취소
저장