diff --git a/.travis.yml b/.travis.yml index dba9a7a5..a4f6750b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,9 @@ services: - docker env: global: - - FE_IMAGE_TAG=1.0.0 - - BE_IMAGE_TAG=1.0.0 - - RESERVE_IMAGE_TAG=1.0.0 + - FE_IMAGE_TAG=1.0.1 + - BE_IMAGE_TAG=1.0.1 + - RESERVE_IMAGE_TAG=1.0.1 - FE_IMAGE_NAME=bu-front - BE_IMAGE_NAME=bu-back - RESERVE_IMAGE_NAME=bu-reserve diff --git a/client/package.json b/client/package.json index bdfc97de..641fb5fe 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "client", - "version": "1.0.0", + "version": "1.0.1", "private": true, "scripts": { "start": "react-scripts start", diff --git a/client/src/components/molecules/DropDown/index.tsx b/client/src/components/molecules/DropDown/index.tsx index 77c1007c..a70f6df9 100644 --- a/client/src/components/molecules/DropDown/index.tsx +++ b/client/src/components/molecules/DropDown/index.tsx @@ -3,7 +3,7 @@ import * as S from './style'; export interface Item { title: string; - desc?: string; + desc: string; value: any; } interface Props { @@ -24,7 +24,7 @@ function DropDown({ return ( handleOnClick({ value, title })} + onClick={(): void => handleOnClick({ value, title, desc })} > {title} {desc} diff --git a/client/src/components/molecules/SearchMap/index.tsx b/client/src/components/molecules/SearchMap/index.tsx index 172e5794..4550baa3 100644 --- a/client/src/components/molecules/SearchMap/index.tsx +++ b/client/src/components/molecules/SearchMap/index.tsx @@ -65,25 +65,27 @@ function SearchMap({ handleOnChange }: Props): React.ReactElement { const handleKeywordChange = async ( e: React.ChangeEvent, - ) => { + ): Promise => { setKeyword(e.target.value); setVisible(true); }; const handleClickResult = ({ title, + desc, value, }: { title: string; + desc: string; value: { latitude: number; longitude: number; }; - }) => { + }): void => { setVisible(false); - setKeyword(title); + setKeyword(title || desc); setLocation(value); - if (handleOnChange) handleOnChange({ address: title, ...value }); + if (handleOnChange) handleOnChange({ address: title || desc, ...value }); }; return ( diff --git a/client/src/components/organisms/EventSection/style.ts b/client/src/components/organisms/EventSection/style.ts index 13fc6148..ee33bd1e 100644 --- a/client/src/components/organisms/EventSection/style.ts +++ b/client/src/components/organisms/EventSection/style.ts @@ -27,6 +27,7 @@ interface ContainerWrapperProps { export const Container = styled.div` display: flex; + width: 50%; flex-direction: column; color: ${palette('grayscale', 1)}; margin-bottom: 5rem; diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..0e8fd629 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,65 @@ +version: '3.7' +services: + front: + image: jdd04026/bu-front:1.0.0-hotfix-1 + container_name: front + ports: + - '8080:80' + networks: + - app + back: + image: jdd04026/bu-back:1.0.0 + container_name: back + restart: always + # env 파일 같은 경우는 서버용으로 따로 설정을 해서 넣어주자. + env_file: + - .env + ports: + - '3000:3000' + networks: + - app + reserve: + image: jdd04026/bu-reserve:1.0.0 + container_name: reserve + restart: always + # env 파일 같은 경우는 서버용으로 따로 설정을 해서 넣어주자. + # 서버의 env파일 설정과 동일하다. + env_file: + - ./env + ports: + - '4000:3000' + networks: + - app + db: + image: jdd04026/mariadb-locale:latest + container_name: bu-db + volumes: + - dbdata:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=pass + - MYSQL_DATABASE=bookus + - MYSQL_USER=user + - MYSQL_PASSWORD=pass + ports: + - '3306:3306' + networks: + - app + redis: + image: redis:5.0.7-alpine + container_name: bu-redis + volumes: + - redisdata:/data + ports: + - '6379:6379' + networks: + - app + +networks: + app: + name: app_bridge + +volumes: + dbdata: + driver: local + redisdata: + driver: local diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 00000000..58b431a2 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,27 @@ +# 이것은 /etc/nginx/conf.d/default.conf로 심볼릭 링크를 가진 파일로 생성하면 됨. +# /etc/nginx/nginx.conf 에서 상위의 파일을 include할 것임. +# 키파일도 동일하게 설정하기. + +server { + listen 443 ssl; + server_name www.bookus.kr; + + ssl_certificate /root/cert.pem; + ssl_certificate_key /root/key.pem; + + location / { + proxy_pass http://127.0.0.1:8080; + } + location /api { + proxy_pass http://127.0.0.1:3000; + } + location /api/users/reserve { + proxy_pass http://127.0.0.1:4000; + } +} + +server { + listen 80; + server_name www.bookus.kr; + return 301 https://$host$request_uri; +} \ No newline at end of file diff --git a/package.json b/package.json index 38da175f..34e81c35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bookus", "private": true, - "version": "1.0.0", + "version": "1.0.1", "main": "index.js", "license": "MIT", "workspaces": { diff --git a/reserve-server/package.json b/reserve-server/package.json index d48be818..e7d7ab7c 100644 --- a/reserve-server/package.json +++ b/reserve-server/package.json @@ -1,7 +1,7 @@ { "name": "reserve-server", "private": true, - "version": "1.0.0", + "version": "1.0.1", "main": "index.js", "license": "MIT", "scripts": { diff --git a/server/package.json b/server/package.json index 6d5a3a2d..e2ba062c 100644 --- a/server/package.json +++ b/server/package.json @@ -1,7 +1,7 @@ { "name": "server", "private": true, - "version": "1.0.0", + "version": "1.0.1", "main": "index.js", "license": "MIT", "scripts": {