lighthouse 성능 보고서 추출 도커 이미지 만들기
2024. 5. 10. 14:43
인프라/Docker
DockerfileFROM node:18.20.2WORKDIR /usr/src/app# Lighthouse 설치RUN npm install -g lighthouse# Chrome 설치RUN apt-get update && apt-get install -y wget gnupg2RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'RUN apt-get update && apt-..
무료 SSL 인증서(Let's Encrypt) 발급 방법 (Nginx)
2024. 1. 17. 09:42
인프라/Middleware
전제 조건 인증서를 발급할 도메인이 DNS 서버에 등록이 되어 있어야 함 (EX. 인터넷망에서 윈도우 cmd로 "nslookup 도메인" 명령 실행하면 매핑된 IP로 연결되어야 함) Nginx 서비스 포트 80에 대해서 방화벽 오픈이 되어 있어야 함 발급 방법 certbot 설치 apt-get update && apt-get install -y certbot Nginx 설정 파일 수정 server { listen 80; server_name yourdomain.com www.yourdomain.com; location ^~ /.well-known/acme-challenge/ { allow all; root /var/www/html; # 경로를 웹 서버 루트 디렉토리로 지정 default_type "tex..
[Docker] Nginx 포워드 프록시 모듈 추가 (ver 1.24)
2024. 1. 10. 15:21
인프라/Docker
참고 링크 : https://github.com/chobits/ngx_http_proxy_connect_module GitHub - chobits/ngx_http_proxy_connect_module: A forward proxy module for CONNECT request handling A forward proxy module for CONNECT request handling - GitHub - chobits/ngx_http_proxy_connect_module: A forward proxy module for CONNECT request handling github.com 버전 Nginx : 1.24.0 패치파일 : proxy_connect_rewrite_102101.patch Dockerfi..
[Docker] 사용자, 그룹을 tomcat으로 하는 커스텀 tomcat 이미지 생성 (Dockerfile)
2023. 12. 8. 20:41
인프라/Docker
Dockerfile # 기본 톰캣 이미지를 베이스로 선택 FROM tomcat:9.0-jre8-alpine # 사용자 및 그룹 추가 RUN addgroup -S tomcat && adduser -S -G tomcat -h $CATALINA_HOME -s /sbin/nologin tomcat # 환경 변수 설정 ENV CATALINA_HOME /usr/local/tomcat ENV PATH $CATALINA_HOME/bin:$PATH # 사용자 및 그룹 권한 변경 RUN chown -R tomcat:tomcat $CATALINA_HOME # 컨테이너에서 사용할 포트 열기 EXPOSE 8080 # CMD 명령을 실행할 사용자 지정 USER tomcat # 컨테이너 시작 시 실행할 명령 CMD ["catali..

Jenkins Email 보내기 (with 파일 첨부, 이메일 템플릿)
2023. 5. 29. 18:46
인프라/Jenkins
Jenkins SMTP 설정 Jenkins 관리 > Configure System > Extended E-mail Notification SMTP server : STMP 도메인 or IP (Gmail) smtp.gmail.com SMTP Port : SMTP 포트 (Gmail) 465 Credential : SMTP 계정 정보 Use SSL 체크 Jenkins 파이프라인 attachmentsPattern : '**/test*.txt' ( {jenkins_home}/workspace/{job_name} 디렉토리 내에서 test*.txt 형식의 파일을 찾아 첨부함 ) pipeline { agent any stages { stage('Approval') { steps { script { def html = ..