반응형
도메인 연결, SSL 인증서 및 LB 처리
일단 기존에 Route53과 ACM, EC2 LB를 이용해서 SSL을 구축, 도메인 연동을 진행했다.
정상적으로 인증서 연동이 되었고, https로 접속, http->https redirect도 처리 되었다.
방식은 기존에 작성해둔 아래 포스트를 참조.
https://jjong-factory.tistory.com/92
서버 세팅
클라이언트용 EC2 를 하나 더 파고
nvm를 이용하여 node 를 설치한다.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc
nvm install 18.14.0
이후 pm2를 다운받아 준다.
npm install -g pm2
이후, git repo를 clone 해 주고 의존성 설치!
의존성 설치 이후에 빌드해준다.
npm install
npm build
이후 pm2로 서버를 실행!
pm2 start npm --name "arkinfo" -- start
이후 nginx 설치,
/etc/nginx/sites-available/default 파일을 아래와 같이 수정한다.
server {
listen 80 default_server;
listen [::]:80 default_server;
# root /var/www/html;
# Add index.php to the list if you are using PHP
# index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
이후, Route53과 Ec2 LB를 연동해서 SSL 인증처리까지 진행해보자.
배포 끝 !!
추후 파이프 라인 구축등을 진행 하면 될 것 같당..
우선순위로는..
페이지별 SEO 처리,
google analytics,
코드 정리,
파이프라인 구축 까지 진행하고 추가 기능 개발로 들어가야겠다.
반응형
'프로그래밍 일지 > 명빵' 카테고리의 다른 글
[개인프로젝트] Redux->Mobx 전환 및 typescript로 변환 (0) | 2023.05.05 |
---|---|
[개인프로젝트] 오퍼레이터 목록 검색 , infinite scroll, 상태관리 (0) | 2023.03.23 |
[개인프로젝트] EC2 Mysql, MongoDB Setting 및 data transper (0) | 2023.03.20 |
[개인프로젝트] EC2 laravel 배포 (Ubuntu22 nginx Laravel 배포) (0) | 2023.03.20 |
[개인프로젝트] 공개모집 태그 로직 정리 및 임시 통신 (SSR) 처리(교집합, 부분집합, Combination 처리) (0) | 2023.03.20 |