매매일지 2024 7 22

2024. 7. 22. 17:30

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

오늘 매매한게 없다. 뽜이팅 해야게따

Posted by roselumi
,

reactjs nextjs nginx setting

IT 2023. 6. 14. 10:10

좌충우돌 했던 설정.. 한방에 정리한다.
나같은 경우는 localhost에 8089 3000 8081 3개의 포트가 있는데 각각 아래와 같음
8089: nginx static server
3000: nextjs front server
8081: back end server
결론적으로, nextjs를 사용하면서 서버 하나 더 추가
nextjs의 SSR관련 로직을 빌드할 때 SSG로 바꿔주는 설정이 있다고 한다. 친구한테 들음. 이런게 있다니 신기함.

1. nginx setting
nginx.conf
location: D:\nginx\conf\nginx.conf
contents: nginx.conf 파일 참고

nginx.conf
0.00MB

2. react setting
2-1. 무중단 배포를 위한 pm2 설치
2-2. yarn or npm(나같은 경우는 yarn을 사용) yarn add pm2
2-3. 설치 되면 프로젝트 루트 폴더에 server.js and ecosystem.config.js 파일 추가(파일은 첨부함)

ecosystem.config
0.00MB
server.js
0.00MB

pm2 start ecosystem.config.js 프롬프트창에 실행시켜 잘되는지 확인한다.  ecosystem.config.js에 포트 관련 설정 있을거임 PORT: 3000 이런식으로...

아래는 내 깃 소스코드 주소
https://github.com/leesangdoc/ucb_front.git
 

Posted by roselumi
,

yarn next start

yarn next build

yarn next dev

pm2 start ecosystem.config.js

pm2 delete all

pm2 delete (name)

 

npm run build

npm run start

npm run dev

Posted by roselumi
,


# user nobody;
worker_processes 1;
error_log  logs/error.log;
error_log  logs/error.log  notice;
error_log  logs/error.log  info;
#pid        logs/nginx.pid;
events { worker_connections  1024; }
http {
    include        mime.types;
    default_type   application/octet-stream;
sendfile         on;
    keepalive_timeout 65;
upstream my_app {
server 127.0.0.1:3000;         # 현재 실행 중인 버전
}

# log_format  main '$remote_addr - $remote_user [$time_local] "$request" '
    #                   '$status $body_bytes_sent "$http_referer" '
    #                   '"$http_user_agent" "$http_x_forwarded_for"';
    # error_log   logs/error.log  main;
    # tcp_nopush      on;
    # gzip   on;

    server {
listen 8089;
listen [::]:8089;
server_name 127.0.0.1;

location / {
root D:/sourceCode/recent_ucb_front/.next/static/;
index index.html;
try_files $uri $uri/ /index.html index.htm;


# 이미지 프록시
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|woff2)$ {
proxy_pass http://localhost:8089;
}

# js파일 프록시
# location ~* \.(?:js)$ {
#  proxy_pass http://localhost:3000;
# }

# cors 해제
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' 'http://localhost:8089';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}

if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' 'http://localhost:8089';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}

if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' 'http://localhost:8089';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}

# proxy_pass http://localhost:3000;
proxy_pass http://my_app;
proxy_http_version  1.1;
proxy_set_header Upgrade  $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header  Host $host;
proxy_cache_bypass  $http_upgrade;
proxy_set_header X-Real-IP  $remote_addr;
proxy_redirect  off;
}

# api route 프록시
#location /api {
# proxy_pass http://localhost:8081/api/;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection 'upgrade';
# proxy_set_header Host $host;
# proxy_cache_bypass $http_upgrade;
#}
}

    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
}

Posted by roselumi
,

| 모임 소개

안녕하세요 (^^)/

서로의 성공을 위한 응원과 성장을 위해 6개월 짜리 마스터마인드 그룹 프로젝트를 기획했습니다~ 이 모임은 6개월 동안 함께 배우고, 삶에 실험하고, 성장시켜 나가기 위해 만들었어요! 따라서 해당 모임의 목적은 자신의 인생 시스템을 업그레이드하고, 든든한 칭구를 만드는 거에욥! >_< 

 

6개월 동안 마스터 마인드 그룹에 속해 활동하며 자신의 삶을 변화시켜 나갈 팀원을 모집합니다!

 

마스터 마인드란 명확한 목표의 달성을 향해 완벽한 조화와 협력의 정신으로 뭉쳐진 둘 또는 그 이상의 마음의 연합을 의미한다. 마스터 마인드 원리는 모든 성공의 토대이며, 개인이든 집단이든 인간의 모든 진보에서 가장 중요한 주춧돌 역할을 해왔다. (Think and grow rich 128p)

자신감이 없으면 마스터 마인드 관계가 될 수 없다. 전쟁을 치르든 무슨 상황이든 마찬가지다. 자신감은 모든 조화로운 관계의 토대가 된다. 당신이 마스터 마인드 연합을 조직해서 충분한 이익을 얻고 싶다면 이 점을 꼭 기억하라. (Think and grow rich 138p)

지금 서 있는 바로 그곳에서 출발하여 자신의 주인이 되어야 한다. 지금 당장 시작하라! 비참하고 곤궁한 옛 자아와는 영원히 작별을 고하자. 우리의 가슴이 열망하는 모든 것을 가져다줄 수 있는 '또 다른 자아'가 있다는 것을 인정하고 기꺼이 받아들이자. (Think and grow rich 254p)

 

모임을 통해 개인의 삶의 변화와 성장도 도모하지만, 앞으로 만들어갈 실험적인 서비스나 창업들도 함께 할 수 있는 멤버들이 생기면 좋겠다는 생각으로 멤버를 모집합니다. 변화할 수 있다는 믿음과 의지가 있는 긍정적인 분들이 신청하면 좋겠습니다. 서로 시간과 에너지, 돈을 아껴보자고요!

 

| 참여 안내
- 참여인원 : 12명 이하(주최자 포함)
- 참여방법 : 아래 링크의 신청하기 버튼을 누르고 신청

(이때 결제수단 '무통장입금' 선택)한 후, 아래 링크의 설문지 제출. 
(설문지 제출 한 사람 중 최종 선발 후 1기 마스터마인드 그룹 진행 예정, 필요한 경우 전화 인터뷰 예정)

*미리 결제부터하지 마세요. 무통장 입금 옵션 선택 후 신청하고, 참여 확정되면 그때 원하는 결제 옵션으로 다시 결제해주시면 됩니다. 결제한다고 무조건 참가가 되는건 아닙니다.

- 활동 기간 : 2023년 7월 1일 - 2023년 12월 31일 (6개월)
- 신청서 작성하기 :  https://docs.google.com/forms/d/1vNOIg-g57LKByamQvJ1mKpjyGabU3sCPmRec0e1Hk0o/edit(클릭)


- 그룹 모임 참여 링크 : 만들예정
| 참여혜택  

삶을 변화시키고 성장시킬 다양한 내용을 배우고, 삶에 실제로 적용시켜 변화를 주는 기회
앞으로 계속 있을 마스터마인드 그룹 네트워킹 파티 참여 기회 제공
참가자 전원 1:1 컨설팅 1시간 (온라인 or 오프라인)

=> 고민을 먼저 구체적으로 작성하고 저에게 메일로 알려주세요(구체적으로 작성하기 힘들다면 저와 함께 작성해보아요!)

| 커리큘럼 (커리큘럼은 유연하게 변화될 가능성 높습니다)  
1. 매월 리뷰모임 진행 (기본은 줌으로 진행하고, 1회는 가능하다면 오프라인 예정)
2. 나라는 우주 발견하기, 스스로를 조건 없이 사랑하는 연습, 자기 믿음 강화 훈련
3. 시간관리 / 에너지 관리 시스템 만들기
4. 부의 마인드 세팅 및 투자 진행 (자산과 부채 관리 워크숍 진행)
5. 개인 사이드 프로젝트 및 메인 프로젝트 최소 2회 이상 진행 (퍼스널 브랜딩 일지 작성)
6. 선정된 책 함께 읽고 스터디 및 적용 (선정된 책은 과정 참여자들에게 별도 공개)
7. 몸 움직이기 프로젝트 (어떤 운동이나 움직임이라도 스스로 즐겁게 할 수 있는 것 발견/실행)
8. 마지막 달 12월에 경수점에서 강연 진행 (원하는 사람만 할 예정이지만, 해보는 경험은 매우 중요)
9. 기타 다양한 실험진행 예정

 

| 규칙 

1. 서로 교환하는 정보는 무료(상품, 재화, 서비스 등은 제공 당사자의 의사에 따라 대가지불 해야할 수 있음)

2. 발표 할게 있다면, 인당 시간은 15분 ~ 최대 20분

3. 모임이 끝나기 전에 각자 모두 다음 모임에서 만나기 전가지 무엇을 할것인가 정해야 함(목표선언 1분이면 충분).

=> 모임에서 서로 팀이기 때문에 사람들을 위해 방향성 설정 해줄 수 있다.

4. 매주 온라인(줌)으로 만난다. 다만, 온라인으로만 만나면 친목이나 팀웍이 제대로 발휘될 수 없으므로, 1달에 1번은 오프라인 모임을 갖는다.

5. 모임은 정시 시작, 정시 종료(그 이후는 각자 알아서)

6. 화상회의 시, 정말정말 부득이한 상황이 아니면 카메라는 반드시 켜서 참여한다.


기타 궁금한 내용은 아래링크를 클릭해서 1:1 메시지를 보내주세요. 감사합니다.
1:1 문의 : https://open.kakao.com/o/sGzjXZnf

'계획' 카테고리의 다른 글

인스타 키워드 좋은거  (0) 2021.11.17
Posted by roselumi
,

한마디로  페이지 폴더 내에 리액트 컴포넌트 아닌거 익스포트 하면 안된다는 나같은 경우는 리액트 훅스에서

useRecoilValue -> useRecoilValueLoadable로 변환해서 처리함

근데, 배포시 서버사이드쪽 관련 nginx로 할때 이슈생김... 이거 내일 해결해야함. 오늘 주말이니까 회사 안가는건 당연함.

Posted by roselumi
,

npm i --save-dev @types/d3

Posted by roselumi
,

D:\sourceCode\the_new_ucb_front>npm install react-wordcloud
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: the_new_ucb_front@0.1.0
npm ERR! Found: styled-components@6.0.0-rc.1
npm ERR! node_modules/styled-components
npm ERR!   styled-components@"^6.0.0-rc.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer styled-components@">=4.0.0 || >=5.0.0" from styled-reset@4.4.7
npm ERR! node_modules/styled-reset
npm ERR!   styled-reset@"^4.4.7" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! C:\Users\lumib\AppData\Local\npm-cache\_logs\2023-05-23T06_19_09_095Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\lumib\AppData\Local\npm-cache\_logs\2023-05-23T06_19_09_095Z-debug-0.log

 

npm install react-wordcloud --save --legacy-peer-deps 로 해결

Posted by roselumi
,

노드 버전 내려라 이딴 말하는 사람들도 있지만 

그냥 올드버전도 SSL 인증 되게 해라. 윈도우 에선 이거 때려 넣으면 됨

set NODE_OPTIONS=--openssl-legacy-provider

뭐 이젠 쳇지피티로 찾으려나???

 

출처: https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

'IT' 카테고리의 다른 글

react typescript 타입관련 에러뜰때  (0) 2023.05.23
react-wordcloud 설치문제 해결  (0) 2023.05.23
폐쇄망 에피소드...  (0) 2023.04.20
Error: Unable to find git in your PATH.  (0) 2023.02.08
flutter unable to find bundled java version.  (0) 2023.02.07
Posted by roselumi
,